data\cnc_clrmsgbuff
PROTOTYPE
FWLIBAPI short WINAPI cnc_clrmsgbuff(unsigned short FlibHndl, short slct);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| slct | in |
Buffer type Select the buffer to be cleared.
|
ERRORS
| Code | Description |
|---|---|
| EW_ATTRIB |
Type of buffer(slct) is neither 0 nor 1. |
| EW_NOOPT |
The OSI-Ethernet option, and the extended driver/library function are necessary. |
| EW_REJECT |
OSI-Ethernet is initializing or restarting. |
data\cnc_dschdir
PROTOTYPE
FWLIBAPI short WINAPI cnc_dschdir(unsigned short FlibHndl, char *dev_name, char *dir, IN_DSFILE *ds_file_in, OUT_DSINFO *ds_info_out, OUT_DSFILE *ds_file_out);
ARGUMENTS
| Name | Direction | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||
| dev_name | in |
|
|||||||||
| dir | in |
Maximum of 32 characters of ASCII character string including NULL, and place the NULL at the end. Maximum of 128 characters of ASCII character string including NULL, and place the NULL at the end. |
|||||||||
| ds_file_in | in |
The pointer to IN_DSFILE structure which passes the setting value of file information taken out of a connection host. IN_DSFILE structure is as follows:
typedef struct in_dsfile {
char path[256]; /* Standard File Name */
long fnum; /* Standard File Number */
long offset; /* Offset */
short req_num; /* Request File Number */
short size_type; /* Size Type */
short detail; /* File Detail */
short dummy;
} IN_DSFILE;
|
|||||||||
| ds_info_out | out |
The pointer to OUT_DSINFO structure which stores the file information from a connection host. OUT_DSINFO structure is as follows:
typedef struct out_dsinfo {
short type; /* Type */
short dummy;
long fnum; /* Serial Number */
long total; /* Total File Number */
unsigned long remain_h; /* Remains Capacity (Upper)*/
unsigned long remain_l; /* Remains Capacity (Lower) */
char dir[256]; /* Current Folder */
} OUT_DSINFO
|
|||||||||
| ds_file_out | out |
The pointer to OUT_DSFILE structure which stores the file information received from the connection host. The area that can be stored the number of data specified by the variable req_num of Argument ds_file_in is needed. OUT_DSFILE structure is as follows:
typedef struct out_dsfile {
short year; /* Last Edit Time */
short mon; /* Last Edit Time */
short day; /* Last Edit Time */
short hour; /* Last Edit Time */
short min; /* Last Edit Time */
short sec; /* Last Edit Time */
long size; /* Size */
unsigned long attr; /* Attribute */
char file[36]; /* File Name */
char info[128]; /* Infomation */
} OUT_DSFILE
|
ERRORS
| Code | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
||||||||||||||||||||||||
| EW_BUSY |
DATA SERVER or embedded Ethernet is processing. |
||||||||||||||||||||||||
| EW_LENGTH |
The Specification of req_num is wrong. |
||||||||||||||||||||||||
| EW_NUMBER |
The Specification of detail is wrong. |
||||||||||||||||||||||||
| EW_DTSRVR |
In order to get more information for this err_no return value,In order to get more information for this err_no return value,cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
data\cnc_dscopyfile
Copying a file in the ATA card with DATA SERVER function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_dscopyfile(unsigned short FlibHndl, char *srcfile, char *dstfile);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| srcfile | in |
Maximum of 33 characters of ASCII character string including NULL,the string must be NULL terminated. |
| dstfile | in |
The file of the same name as the file which already exists cannot be specified. Maximum of 33 characters of ASCII character string including NULL,the string must be NULL terminated. |
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
|||||||||
| EW_MODE |
CNC mode is not EDIT mode. |
|||||||||
| EW_BUSY |
- Try again because DATA SERVER is processing. |
|||||||||
| EW_DTSRVR |
In order to get more information for this err_no return value,In order to get more information for this err_no return value,cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
data\cnc_dsftpcancel
cnc_dsget_req()
cnc_dsput_req()
cnc_dsmget_req()
cnc_dsmput_req()
cnc_dslistget_req()
cnc_dslistput_req()
cnc_dslistdel_req()
Result of stopping file transfer calls cnc_dsftpstat() function.
It is necessary to get EW_OK or EW_REJECT or EW_DTSRVR as the completion status by cnc_dsftpstat() when this function was executed successfully.
*
"Req." is declare the stop demands of a file transfer each FTP.
"ret=" is declare the completion status when perfoming cnc_dsftpstat() function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_dsftpcancel(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
|||||||||
| EW_FUNC |
|
data\cnc_dsftpstat
cnc_dsget_req()
cnc_dsput_req()
cnc_dsmget_req()
cnc_dsmput_req()
cnc_dslistget_req()
cnc_dslistput_req()
cnc_dslistdel_req()
In addition, according to the state at the time of this function execution, completion status is as follows.
*
"Req." is declare start demand the file operation each FTP.
"ret=" is declare the completion status when perfoming this function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_dsftpstat(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
ERRORS
| Code | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_BUSY |
- Try again because DATA SERVER is processing. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_FUNC |
Please perform a FTP-related function beforehand. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_REJECT |
FTP-related processing was canceled. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_DTSRVR |
In order to get more information for this err_no return value,In order to get more information for this err_no return value,cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
data\cnc_dsget_req
When this function is normally ended, it starts getting files from host computer.
About the result which GET the file, it takes out with the cnc_dsftpstat() function.
Don't use DATA SERVER function (except for DNC operetion) by the CNC side after this function carries out a normal end until it takes out EW_OK or EW_DTSRVR of completion status with a cnc_dsftpstat().
Therefore, it is necessary to get either EW_OK or EW_DTSRVR as the completion status by cnc_dsftpstat() when this function was executed successfully.
*
"Req." is declare start demand the file GET.
"ret=" is declare the completion status when perfoming cnc_dsftpstat() function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_dsget_req(unsigned short FlibHndl, char *net_file, char *nc_file, short binary);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| net_file | in |
The specification of the file name of the DATA SERVER is as follows:
|
||||||
| nc_file | in |
The specification of the file name of the DATA SERVER is as follows:
|
||||||
| binary | in |
|
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
|||||||||
| EW_BUSY |
- Try again because DATA SERVER is processing. |
|||||||||
| EW_NUMBER |
Specification of binary is wrong. |
data\cnc_dslistdel_req
When this function carries out a normal end, it is shown that List-DEL of the file to a host computer was started.
About the result which List-DEL the file, it takes out with the cnc_dsftpstat().
Don't use DATA SERVER function (expect for DNC operetion) by the CNC side after this function carries out a normal end until it takes out EW_OK of completion status, or EW_DTSRVR with cnc_dsftpstat().
Therefore, it is necessary to get either EW_OK or EW_DTSRVR as the completion status by cnc_dsftpstat() when this function was executed successfully.
*
"Req." is declare start demand the file List-DEL.
"ret=" is declare the completion status when perfoming cnc_dsftpstat() function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_dslistdel_req(unsigned short FlibHndl, char *file);
ARGUMENTS
| Name | Direction | Description | |||||
|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||
| file | in |
|
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
|||||||||
| EW_BUSY |
- Try again because DATA SERVER is processing. |
data\cnc_dslistget_req
When this function carries out a normal end, it is shown that List-GET of the file from a host computer was started.
Please take out with cnc_dsftpstat() about the result which List-GET the file.
Don't use DATA SERVER function (expect for DNC operetion) by the CNC side after this function carries out a normal end until it takes out EW_OK of completion status, or EW_DTSRVR with cnc_dsftpstat().
Therefore, it is necessary to get either EW_OK or EW_DTSRVR as the completion status by cnc_dsftpstat() when this function was executed successfully.
*
"Req." is declare start demand the file List-GET.
"ret=" is declare the completion status when perfoming cnc_dsftpstat() function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_dslistget_req(unsigned short FlibHndl, char *file);
ARGUMENTS
| Name | Direction | Description | |||||
|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||
| file | in |
|
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
|||||||||
| EW_BUSY |
- Try again because DATA SERVER is processing. |
data\cnc_dslistput_req
When this function carries out a normal end, it is shown that List-PUT of the file to a host computer was started.
About the result which List-PUT the file, it takes out with the cnc_dsftpstat().
Don't use DATA SERVER function (expect for DNC operetion) by the CNC side after this function carries out a normal end until it takes out EW_OK of completion status, or EW_DTSRVR with cnc_dsftpstat().
Therefore, it is necessary to get either EW_OK or EW_DTSRVR as the completion status by cnc_dsftpstat() when this function was executed successfully.
*
"Req." is declare start demand the file List-PUT.
"ret=" is declare the completion status when perfoming cnc_dsftpstat() function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_dslistput_req(unsigned short FlibHndl, char *file);
ARGUMENTS
| Name | Direction | Description | |||||
|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||
| file | in |
|
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
|||||||||
| EW_BUSY |
- Try again because DATA SERVER is processing. |
data\cnc_dsmget_req
A wild card can be used for a file name and the file transfer of two or more files whose file names correspond can be carryed out continuously.
When this function carries out a normal end, it is shown that MGET of the file from a host computer was started.
Please take out with cnc_dsftpstat() about the result which MGET the file.
Don't use DATA SERVER function (expect for DNC operetion) by the CNC side after this function carries out a normal end until it takes out EW_OK of completion status, or EW_DTSRVR with cnc_dsftpstat().
Therefore, it is necessary to get either EW_OK or EW_DTSRVR as the completion status by cnc_dsftpstat() when this function was executed successfully.
*
"Req." is declare start demand the file MGET.
"ret=" is declare the completion status when perfoming cnc_dsftpstat() function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_dsmget_req(unsigned short FlibHndl, char *file);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| file | in |
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure. 22 : The option board is nothing. 24 : The DATA SERVER function is nothing. 26 : The ATA Card is nothing. |
| EW_BUSY |
- Try again because DATA SERVER is processing. |
data\cnc_dsmkdir
PROTOTYPE
FWLIBAPI short WINAPI cnc_dsmkdir(unsigned short FlibHndl, char *dev_name, char *dir);
ARGUMENTS
| Name | Direction | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||
| dev_name | in |
Specify the device name is as follows:
|
|||||||||
| dir | in |
The folder of the same name as the folder and file which already exist cannot be created. Maximum of 33 characters of ASCII character string including NULL, and place the NULL at the end. The folder of the same name as the folder and file which already exist cannot be created. Maximum of 128 characters of ASCII character string including NULL, and place the NULL at the end. Only the newly created folder name is specified(path specification is impossible). |
ERRORS
| Code | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
||||||||||||||||||||||||
| EW_BUSY |
DATA SERVER or embedded Ethernet is processing. |
||||||||||||||||||||||||
| EW_DATA |
The Specification of dev_name is wrong. |
||||||||||||||||||||||||
| EW_DTSRVR |
In order to get more information for this err_no return value,In order to get more information for this err_no return value,cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
data\cnc_dsmput_req
A wild card can be used for a file name and the file transfer of two or more files whose file names correspond can be carryed out continuously.
When this function carries out a normal end, it is shown that MPUT of the file to a host computer is started.
Please take out with cnc_dsftpstat() about the result which MPUT the file.
Don't use DATA SERVER function (expect for DNC operetion) by the CNC side after this function carries out a normal end until it takes out EW_OK of completion status, or EW_DTSRVR with cnc_dsftpstat().
Therefore, it is necessary to get either EW_OK or EW_DTSRVR as the completion status by cnc_dsftpstat() when this function was executed successfully.
*
"Req." is declare start demand the file MPUT.
"ret=" is declare the completion status when perfoming cnc_dsftpstat() function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_dsmput_req(unsigned short FlibHndl, char *file);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| file | in |
|
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
|||||||||
| EW_BUSY |
- Try again because DATA SERVER is processing. |
data\cnc_dsput_req
When this function is normally ended, it starts putting files from host computer.
FOR the result which PUT the file, it takes out with the cnc_dsftpstat().
Don't use DATA SERVER function (except for DNC operetion) by the CNC side after this function carries out a normal end until it receives EW_OK or EW_DTSRVR of completion status with a cnc_dsftpstat().
Therefore, it is necessary to get either EW_OK or EW_DTSRVR as the completion status by cnc_dsftpstat() when this function was executed successfully.
*
"Req." is declare start demand the file PUT.
"ret=" is declare the completion status when perfoming cnc_dsftpstat() function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_dsput_req(unsigned short FlibHndl, char *net_file, char *nc_file);
ARGUMENTS
| Name | Direction | Description | |||||
|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||
| net_file | in |
The specification of the file name of the DATA SERVER is as follows:
|
|||||
| nc_file | in |
The specification of the file name of the DATA SERVER is as follows:
|
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
|||||||||
| EW_BUSY |
- Try again because DATA SERVER is processing. |
data\cnc_dsremove
PROTOTYPE
FWLIBAPI short WINAPI cnc_dsremove(unsigned short FlibHndl, char *dev_name, char *file);
ARGUMENTS
| Name | Direction | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||
| dev_name | in |
Specify the device name is as follows:
|
|||||||||
| file | in |
Maximum of 33 characters of ASCII character string including NULL,and place the NULL at the end. The pointer of the variable area where the device name to specify is stored specify. The specification which used the wild card('*','?')is also possible. However, when '*' is used, the character after '*' cannot be specified. (Example:The specification "12*4" cannot be performed.) Only the folder name to delete is specified(path specification is not available). |
ERRORS
| Code | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
||||||||||||||||||||||||
| EW_BUSY |
DATA SERVER or embedded Ethernet is processing. |
||||||||||||||||||||||||
| EW_DATA |
The Specification of dev_name is wrong. |
||||||||||||||||||||||||
| EW_DTSRVR |
In order to get more information for this err_no return value,In order to get more information for this err_no return value,cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
data\cnc_dsrename
PROTOTYPE
FWLIBAPI short WINAPI cnc_dsrename(unsigned short FlibHndl, char *dev_name, char *src_name, char *dst_name);
ARGUMENTS
| Name | Direction | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||
| dev_name | in |
Specify the device name is as follows:
|
|||||||||
| src_file | in |
Maximum of 33 characters of ASCII character string including NULL,the string must be NULL terminated. Maximum of 128 characters of ASCII character string including NULL,the string must be NULL terminated. |
|||||||||
| dst_file | in |
It cannot change into the same name as the folder and and file which alreadty exist. It cannot change into the same name as the folder and and file which alreadty exist. |
ERRORS
| Code | Description | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
|||||||||||||||||||||||||||
| EW_BUSY |
DATA SERVER or embedded Ethernet is processing. |
|||||||||||||||||||||||||||
| EW_DATA |
Specification of dev_name is inaccuracy. |
|||||||||||||||||||||||||||
| EW_DTSRVR |
In order to get more information for this err_no return value,In order to get more information for this err_no return value,cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
data\cnc_dsrmdir
PROTOTYPE
FWLIBAPI short WINAPI cnc_dsrmdir(unsigned short FlibHndl, char *dev_name, char *dir);
ARGUMENTS
| Name | Direction | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||
| dev_name | in |
Specify the device name is as follows:
|
|||||||||
| dir | in |
Maximum of 33 characters of ASCII character string including NULL, and place the NULL at the end. Maximum of 128 characters of ASCII character string including NULL, and place the NULL at the end. Only the folder name to delete is specified(path specification is impossible). |
ERRORS
| Code | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
||||||||||||||||||||||||
| EW_BUSY |
DATA SERVER or embedded Ethernet is processing. |
||||||||||||||||||||||||
| EW_DATA |
The Specification of dev_name is wrong. |
||||||||||||||||||||||||
| EW_DTSRVR |
In order to get more information for this err_no return value,In order to get more information for this err_no return value,cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
data\cnc_dtsvchkdsk
PROTOTYPE
FWLIBAPI short WINAPI cnc_dtsvchkdsk(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_BUSY |
Try again because DATA SERVER is processing. (There is a possibility of forgetting to call cnc_dtsvftpstat function.) |
||||||
| EW_NOOPT |
|
||||||
| EW_DTSRVR |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
|
data\cnc_dtsvcnclupdn
Cancels the following if it is being executed.
- Download from DATA SERVER to CNC
- Upload from CNC to DATA SERVER
PROTOTYPE
FWLIBAPI short WINAPI cnc_dtsvcnclupdn(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
ERRORS
| Code | Description | ||||
|---|---|---|---|---|---|
| EW_FUNC |
|
||||
| EW_NOOPT |
|
data\cnc_dtsvdelete
PROTOTYPE
FWLIBAPI short WINAPI cnc_dtsvdelete(unsigned short FlibHndl, char *nc_file);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| nc_file | in |
Specify the pointer of the file name in the DATA SERVER.
<ex.> "XXXXXXXX.XXX" + NULL However, the "O" number is managed as a file name now.<ex.> "O0001" + NULL |
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_BUSY |
Try again because DATA SERVER is processing. (The unexecution of cnc_dtsvftpstat is included.) |
||||||
| EW_NOOPT |
|
||||||
| EW_DTSRVR |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
|
data\cnc_dtsvdownload
* "Req." shows start request for download by this function.
Throughout the prohibition term, the completion status of the following function is EW_BUSY.
Therefore, normal termination of this function shows that downloading the file from the DATA SERVER has been started.
The result of downloading file must be got by cnc_dtsvupdnstat.
Don't use the data sever function(except DNC operation) at the CNC side until either EW_OK or EW_DTSRVR as the completion status is got by cnc_dtsvupdnstat after this function was finished.
* "ret=" is the completion status when cnc_dtsvupdnstat is done.
cnc_dwnstart
cnc_vrfstart
cnc_dncstart
cnc_delete
cnc_delall
cnc_search
cnc_dtsvdownload
cnc_dtsvupload
Therefore, it is necessary to get either EW_OK or EW_DTSRVR as the completion status by cnc_dtsvupdnstat when this function was executed successfully.
PROTOTYPE
FWLIBAPI short WINAPI cnc_dtsvdownload(unsigned short FlibHndl, char *nc_file);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| nc_file | in |
Specify as follows using ASCII code. "O" + <4 figures> + "NULL" |
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_BUSY |
|
||||||
| EW_NUMBER |
|
||||||
| EW_NOOPT |
|
||||||
| EW_DTSRVR |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
|
data\cnc_dtsvftpget
* "Req." shows the start request for getting file by this function. Throughout the prohibition term, the completion status of the following function is EW_BUSY. Therefore, it is necessary to get either EW_OK or EW_DTSRVR as the completion status by cnc_dtsvftpstat when this function was executed successfully.
Therefore, normal termination of this function shows that getting the file from the host computer has been started.
The result of getting file must be got by cnc_dtsvftpstat.
Don't use the data sever function(except DNC operation) at the CNC side until either EW_OK or EW_DTSRVR as the completion status is got by cnc_dtsvftpstat after this function was finished.
* "ret=" is the completion status when cnc_dtsvftpstat is done.
cnc_dtsvftpget
cnc_dtsvftpput
cnc_dtsvdelete
cnc_dtsvrdpgdir
cnc_dtsvrdset
cnc_dtsvwrset
cnc_dtsvchkdsk
cnc_dtsvhdformat
PROTOTYPE
FWLIBAPI short WINAPI cnc_dtsvftpget(unsigned short FlibHndl, char *net_file,char *nc_file);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| net_file | in |
Specify the pointer to the file name in the host computer.
|
| nc_file | in |
Specify the pointer to the file name in the DATA SERVER.
<ex.> "XXXXXXXX.XXX" + NULL However, the "O" number is managed as a file name now.<ex.> "O0001" + NULL |
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_BUSY |
Try again because DATA SERVER is processing. (There is a possibility of forgetting to call cnc_dtsvftpstat function.) |
||||||
| EW_NOOPT |
|
||||||
| EW_DTSRVR |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
|
data\cnc_dtsvftpput
* "Req." shows the start request for putting file by this function. Throughout the prohibition term, the completion status of the following function is EW_BUSY. Therefore, it is necessary to get either EW_OK or EW_DTSRVR as the completion status by cnc_dtsvftpstat when this function was executed successfully.
Therefore, normal termination of this function shows that putting the file to the host computer has been started.
The result of putting file must be got by cnc_dtsvftpstat.
Don't use the data sever function(except DNC operation) at the CNC side until either EW_OK or EW_DTSRVR as the completion status is got by cnc_dtsvftpstat after this function had been finished.
* "ret=" is the completion status when cnc_dtsvftpstat is done.
cnc_dtsvftpget
cnc_dtsvftpput
cnc_dtsvdelete
cnc_dtsvrdpgdir
cnc_dtsvrdset
cnc_dtsvwrset
cnc_dtsvchkdsk
cnc_dtsvhdformat
PROTOTYPE
FWLIBAPI short WINAPI cnc_dtsvftpput(unsigned short FlibHndl, char *net_file,char *nc_file);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| net_file | in |
Specify the pointer to the file name in the host computer.
|
| nc_file | in |
Specify the pointer to the file name in the DATA SERVER.
<ex.> "XXXXXXXX.XXX" + NULL However, the "O" number is managed as a file name now.<ex.> "O0001" + NULL |
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_BUSY |
Try again because DATA SERVER is processing. (There is a possibility of forgetting to call cnc_dtsvftpstat function.) |
||||||
| EW_NOOPT |
|
||||||
| EW_DTSRVR |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
|
data\cnc_dtsvftpstat
The execution result of cnc_dtsvftpput, cnc_dtsvftpget function can be got only once.
* "Req." shows the start request for putting/getting file by cnc_dtsvftpput / cnc_dtsvftpget function.
The completion status is as follows when this function is executed.
* "ret=" is the completion status when this function is done.
PROTOTYPE
FWLIBAPI short WINAPI cnc_dtsvftpstat(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_BUSY |
Try again because DATA SERVER is processing. |
||||||
| EW_FUNC |
|
||||||
| EW_NOOPT |
|
||||||
| EW_DTSRVR |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
|
data\cnc_dtsvgetdncpg
PROTOTYPE
FWLIBAPI short WINAPI cnc_dtsvgetdncpg(unsigned short FlibHndl, char *nc_file);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| nc_file | out |
The file name is as follows. |
ERRORS
| Code | Description | ||||
|---|---|---|---|---|---|
| EW_NOOPT |
|
data\cnc_dtsvgetmode
PROTOTYPE
FWLIBAPI short WINAPI cnc_dtsvgetmode(unsigned short FlibHndl,short *dsmode);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| dsmode | out |
|
ERRORS
| Code | Description | ||||
|---|---|---|---|---|---|
| EW_FUNC |
|
||||
| EW_NOOPT |
|
data\cnc_dtsvhdformat
PROTOTYPE
FWLIBAPI short WINAPI cnc_dtsvhdformat(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_BUSY |
Try again because DATA SERVER is processing. (There is a possibility of forgetting to call cnc_dtsvftpstat function.) |
||||||
| EW_NOOPT |
|
||||||
| EW_DTSRVR |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
|
data\cnc_dtsvmntinfo
This is the function for purposes of maintenance.
-
Count which the buffer between the DATA SERVER and CNC has become empty during downloading CNC program from the DATA SERVER to CNC
-
Total size downloaded from the DATA SERVER to CNC
-
Read pointer used by the DATA SERVER
-
Write pointer used by the DATA SERVER
PROTOTYPE
FWLIBAPI short WINAPI cnc_dtsvmntinfo(unsigned short FlibHndl,ODBDSMNT *minfo);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| minfo | out |
typedef struct odbdsmnt {
long empty_cnt ;
long total_size ;
long read_ptr ;
long write_ptr ;
} ODBDSMNT ;
|
ERRORS
| Code | Description | ||||
|---|---|---|---|---|---|
| EW_NOOPT |
|
data\cnc_dtsvrdcram
This is the function for purposes of maintenance.
PROTOTYPE
FWLIBAPI short WINAPI cnc_dtsvrdcram(unsigned short FlibHndl,long addr,long *size,char *cram);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| addr | in |
Specify the offset address from top of the interface buffer. (0x00000000 <--> 0x0000FFFF) |
| size | in/out |
Specify the number of byte of read out.(1 <--> 65536) The size which has been read actually is stored. |
| cram | out |
The area more than above size is necessary. |
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
|
| EW_NUMBER |
|
| EW_NOOPT |
- The extended driver/library function is necessary. - The DATA SERVER board(hardware) is necessary. |
data\cnc_dtsvrderrmsg
PROTOTYPE
FWLIBAPI short WINAPI cnc_dtsvrderrmsg(unsigned short FlibHndl,short slct,char *errmsg);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| slct | in |
Specify the following message.
|
||||||
| errmsg | in |
The maximum length of the message is 481 byte including 'NULL'. The error message is stored in accordance with a screen image of 12 lines * 40 characters, and the last character is 'NULL'. |
ERRORS
| Code | Description | ||||
|---|---|---|---|---|---|
| EW_FUNC |
|
||||
| EW_ATTRIB |
|
||||
| EW_NOOPT |
|
data\cnc_dtsvrdfile
This function is effective for the DATA SERVER board(10BASE-T), and 16i/18i/21i, 0i.
PROTOTYPE
FWLIBAPI short WINAPI cnc_dtsvrdfile(unsigned short FlibHndl,char *dtsv_file,char *pc_file,short chnl);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| dtsv_file | in |
The specification of the file name of the DATA SERVER is as follows:
<ex.> "XXXXXXXX.XXX" + NULL However, the "O" number is managed as a file name now.<ex.> "O0001" + NULL |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pc_file | in |
The specification of the file name of the hard disk on personal computer is as follows:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| chnl | in |
DATA SERVER has 8 Task channels. The channel that a parsonal computer uses for transferring file is specified by this "chnl". Available number is from 11 to 17. DATA SERVER can give 8 services for each user(NC, Personal computer, PMC, C-EXE). In order to decide which channel each user uses, it is necessary that NC parameters(No.941-948) are set with user's number as follows.
NC patameters(No.941-948) must be set before using this function(If these parameters are all invalid, CNC No.1 uses channel No.1). After using this function, the mode of the channel used by this function is changed to storage mode. |
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_BUSY |
|
||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
|
||||||
| EW_PARAM |
|
||||||
| EW_NUMBER |
|
||||||
| EW_NOOPT |
|
||||||
| EW_DTSRVR |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.As for the details, see "Ethernet Board/DATA SERVER Board OPERATOR'S MANUAL".
|
data\cnc_dtsvrdpgdir
PROTOTYPE
FWLIBAPI short WINAPI cnc_dtsvrdpgdir(unsigned short FlibHndl, char *nc_file,short number,ODBDSDIR *dsdir);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| nc_file | in |
If 'NULL'(first character is 'NULL') is specified, it is interpreted that the first file is specified. If the specified file does not exist, it is interpreted that the next file in alphabetical order which exists in the directory is specified. However, if the specified file is backward than the last file, it is interpreted that the last file is specified.
|
||||||
| number | in |
Specify the number of directory information. effective range : 1 <= number <= 32 |
||||||
| dsdir | out |
Pointer to the ODBDSDIR structure including the directory information in the DATA SERVER.
typedef struct odbdsdir {
long file_num ; /* number of files in hard disk */
long remainder ; /* remainder capacity of hard disk */
short data_num ; /* number of directory */
struct {
char file_name[16] ; /* file name */
char comment[64] ; /* comment */
long size ; /* file size */
char date[16] ; /* update date */
} data[32] ;
} ODBDSDIR ;
|
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_BUSY |
Try again because DATA SERVER is processing. (The unexecution of cnc_dtsvftpstat is included.) |
||||||
| EW_NUMBER |
The number of directory to read is wrong. |
||||||
| EW_NOOPT |
|
||||||
| EW_DTSRVR |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
|
data\cnc_dtsvrdset
PROTOTYPE
FWLIBAPI short WINAPI cnc_dtsvrdset(unsigned short FlibHndl,IODBDSSET *set);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| set | out |
typedef struct iodbdsset {
char host_ip[16] ;
char host_uname[32] ;
char host_passwd[32] ;
char host_dir[128] ;
char dtsv_mac[13] ;
char dtsv_ip[16] ;
char dtsv_mask[16] ;
} IODBDSSET ;
|
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_BUSY |
Try again because DATA SERVER is processing. (There is a possibility of forgetting to call cnc_dtsvftpstat function.) |
||||||
| EW_FUNC |
|
||||||
| EW_NOOPT |
|
||||||
| EW_DTSRVR |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
|
data\cnc_dtsvsavecram
This is the function for purposes of maintenance.
PROTOTYPE
FWLIBAPI short WINAPI cnc_dtsvsavecram(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_BUSY |
|
||||||
| EW_FUNC |
|
||||||
| EW_DTSRVR |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
|
data\cnc_dtsvsetdncpg
PROTOTYPE
FWLIBAPI short WINAPI cnc_dtsvsetdncpg(unsigned short FlibHndl, char *nc_file);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| nc_file | in |
|
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_BUSY |
|
||||||
| EW_NOOPT |
|
||||||
| EW_DTSRVR |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
|
data\cnc_dtsvsetmode
PROTOTYPE
FWLIBAPI short WINAPI cnc_dtsvsetmode(unsigned short FlibHndl,short dsmode);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| dsmode | in |
|
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_BUSY |
|
||||||
| EW_FUNC |
|
||||||
| EW_DATA |
|
||||||
| EW_NOOPT |
|
data\cnc_dtsvupdnstat
The completion status is as follows when this function is executed.
* "Req." shows the start request for download/upload the file by cnc_dtsvdownload/cnc_dtsvupload functions.
* "ret=" is the completion status when this function is done.
PROTOTYPE
FWLIBAPI short WINAPI cnc_dtsvupdnstat(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_RESET |
- As 'RESET or STOP' was pushed, upload/download was forced to cancel. |
||||||
| EW_BUSY |
- As upload/download is being executed, try again. |
||||||
| EW_FUNC |
- upload/download is not executed Execute either cnc_dtsvdownload or cnc_dtsvupload beforehand. |
||||||
| EW_DATA |
- file has already existed |
||||||
| EW_NOOPT |
|
||||||
| EW_PROT |
- CNC parameter is a state of write-protection.(O8000-/O9000- protection, encoding). |
||||||
| EW_OVRFLOW |
p - Because free area in CNC memory runs short, make enough free area. - The total number of program exceeded the limit of registrable programs in CNC. |
||||||
| EW_DTSRVR |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
|
data\cnc_dtsvupload
Throughout the prohibition term, the completion status of the following function is EW_BUSY.
Therefore, normal termination of this function shows that uploading the file to the DATA SERVER has been started.
The result of uploading file must be got by cnc_dtsvupdnstat.
Don't use the data sever function(except DNC operation) at the CNC side until either EW_OK or EW_DTSRVR as the completion status is got by cnc_dtsvupdnstat after this function was finished.
* "Req." shows start request for upload by this function.
* "ret=" is the completion status when cnc_dtsvupdnstat is done.
cnc_dwnstart
cnc_vrfstart
cnc_dncstart
cnc_delete
cnc_delall
cnc_search
cnc_dtsvdownload
cnc_dtsvupload
Therefore, it is necessary to get either EW_OK or EW_DTSRVR as the completion status by cnc_dtsvupdnstat when this function was executed successfully.
PROTOTYPE
FWLIBAPI short WINAPI cnc_dtsvupload(unsigned short FlibHndl, char *nc_file);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| nc_file | in |
Specify as follows using ASCII code. "O" + <4 figures> + "NULL" |
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_BUSY |
|
||||||
| EW_NUMBER |
|
||||||
| EW_NOOPT |
|
||||||
| EW_DTSRVR |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
|
data\cnc_dtsvwrfile
This function is effective for the DATA SERVER board(10BASE-T), and 16i/18i/21i, 0i.
PROTOTYPE
FWLIBAPI short WINAPI cnc_dtsvwrfile(unsigned short FlibHndl,char *pc_file,char *dtsv_file,short chnl);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pc_file | in |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| dtsv_file | in |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| chnl | in |
NC patameters(No.941-948) must be set before using this function(If these parameters are all invalid, CNC No.1 uses channel No.1). After using this function, the mode of the channel used by this function is changed to storage mode. |
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_BUSY |
|
||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
|
||||||
| EW_PARAM |
|
||||||
| EW_NUMBER |
|
||||||
| EW_NOOPT |
|
||||||
| EW_DTSRVR |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.As for the details, see "Ethernet Board/DATA SERVER Board OPERATOR'S MANUAL".
|
data\cnc_dtsvwrset
PROTOTYPE
FWLIBAPI short WINAPI cnc_dtsvwrset(unsigned short FlibHndl,IODBDSSET *set);
ARGUMENTS
| Name | Direction | Description | ||||
|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||
| set | in |
typedef struct iodbdsset {
char host_ip[16] ;
char host_uname[32] ;
char host_passwd[32] ;
char host_dir[128] ;
char dtsv_mac[13] ;
char dtsv_ip[16] ;
char dtsv_mask[16] ;
} IODBDSSET ;
|
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_BUSY |
Try again because DATA SERVER is processing. (There is a possibility of forgetting to call cnc_dtsvftpstat function.) |
||||||
| EW_FUNC |
- This function is not available for the DATA SERVER board(10BASE-T). |
||||||
| EW_NOOPT |
|
||||||
| EW_DTSRVR |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
|
data\cnc_rdcomlogmsg
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdcomlogmsg(unsigned short FlibHndl, char *logmsg);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. |
||||||||||||||||||||||||
| logmsg | out |
Following three types of logging messages are returned.
Delimiting character is ASCII "|". Delimiting character is ASCII ":". If there are not enough space to store above characters, the operation of this function is not guaranteed. |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used at TT. |
| EW_NOOPT |
The DNC2 option, and the extended driver/library function are necessary. |
data\cnc_rdcomopemsg
Reads operator's message for DNC1,DNC2.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdcomopemsg(unsigned short FlibHndl, char *opemsg);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. |
| opemsg | out |
Five operator's messages are returned at maximum. If it is not declared as above, the operation of this function is not guaranteed. |
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The DNC1, DNC2 option, and the extended driver/library function are necessary. |
data\cnc_rdcomparam
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdcomparam(unsigned short FlibHndl, IODBCPRM *odb);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| odb | out |
typedef struct {
char NcApli[65] ;
char Dummy1 ;
char HostApli[65] ;
char Dummy2 ;
unsigned long StatPstv ;
unsigned long StatNgtv ;
unsigned long Statmask ;
unsigned long AlarmStat ;
unsigned long PsclHaddr ;
unsigned long PsclLaddr ;
unsigned short SvcMode1 ;
unsigned short SvcMode2 ;
long FileTout ;
long RemTout ;
} IODBCPRM ;
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The DNC1, DNC2, OSI-Ethernet option, and the extended driver/library function are necessary. |
data\cnc_rddncfname
PROTOTYPE
FWLIBAPI short WINAPI cnc_rddncfname(unsigned short FlibHndl, char *FileName);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| FileName | out |
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used at 15TT. |
| EW_NOOPT |
The DNC1, DNC2, OSI-Ethernet option, and the extended driver/library function are necessary. |
data\cnc_rddsdevinfo
All the number of pages , the use number of pages, the total number of entries, and the numberof use entries are taken out from an ATA card.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rddsdevinfo(unsigned short FlibHndl, short type, ODBPDFINF *info);
ARGUMENTS
| Name | Direction | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||
| type | in |
The following specification is possible.
|
||||||||||||
| info | out |
ODBPDFINF structure is as follows:
typedef struct odbpdfinf {
long used_page; /* active capacity */
long all_page; /* full capacity */
long used_dir; /* active entry number */
long all_dir; /* full entry number */
} ODBPDFINF;
|
ERRORS
| Code | Description | |||
|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure. 22 : The option board is nothing. 24 : The DATA SERVER function is nothing. 26 : The ATA Card is nothing. |
|||
| EW_BUSY |
- Try again because DATA SERVER is processing. |
|||
| EW_NUMBER |
The Specification of type is wrong. |
|||
| EW_DTSRVR |
In order to get more information for this err_no return value,In order to get more information for this err_no return value,cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
data\cnc_rddsdir
PROTOTYPE
FWLIBAPI short WINAPI cnc_rddsdir(unsigned short FlibHndl, char *dev_name, short *host, char *path);
ARGUMENTS
| Name | Direction | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||
| dev_name | in |
Specify the device name is as follows:
|
|||||||||
| host | out |
The pointer to the variable area which stores the taken out connection host number is specfied. The numerical value of 1 to 3 returns. Moreover, when not using it, 0 returns. |
|||||||||
| path | out |
The current folder name to receive 256 bytes or less of ASCII characters string including NULL. |
ERRORS
| Code | Description | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
|||||||||||||||||||||
| EW_BUSY |
DATA SERVER or embedded Ethernet is processing. |
|||||||||||||||||||||
| EW_DATA |
The Specification of dev_name is wrong. |
|||||||||||||||||||||
| EW_DTSRVR |
In order to get more information for this err_no return value,In order to get more information for this err_no return value,cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
data\cnc_rddsdncfile
PROTOTYPE
FWLIBAPI short WINAPI cnc_rddsdncfile(unsigned short FlibHndl, char *dev_name, short *host, char *dncfile);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| dev_name | in |
Specify the device name is as follows:
|
||||||
| host | out |
The pointer to the variable area which stores the connection host number is specfied. The numerical value of 1 to 3 returns. However, when the file for DNC operation is not set up, 0 returns. |
||||||
| dncfile | out |
The current file name to receive 256 bytes or less of ASCII characters string including NULL. When the file for DNC operation is not set up, only NULL may return. |
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
|||||||||
| EW_DATA |
The Specification of dev_name is wrong. |
data\cnc_rddsfile
PROTOTYPE
FWLIBAPI short WINAPI cnc_rddsfile(unsigned short FlibHndl, char *dev_name, IN_DSFILE *ds_file_in, OUT_DSINFO *ds_info_out, OUT_DSFILE *ds_file_out);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||
| dev_name | in |
Specify the device name is as follows:
|
||||||||||||||||||||||||
| ds_file_in | in |
IN_DSFILE structure is as follows:
typedef struct in_dsfile {
char path[256]; /* Standard File Name */
long fnum; /* Standard File Number */
long offset; /* Offset */
short req_num; /* Request File Number */
short size_type; /* Size Type */
short detail; /* File Detail */
short dummy;
} IN_DSFILE;
|
||||||||||||||||||||||||
| ds_info_out | out |
It is a pointer to OUT_DSINFO structure which stores a connection host's file information. OUT_DSINFO structure is as follows:
typedef struct out_dsinfo {
short type; /* Type */
short dummy;
long fnum; /* Serial Number */
long total; /* Total File Number */
unsigned long remain_h; /* Remains Capacity(Upper) */
unsigned long remain_l; /* Remains Capacity(Lower) */
char dir[256]; /* Current Folder */
} OUT_DSINFO
|
||||||||||||||||||||||||
| ds_file_out | out |
The area which can store the data for the number specified by the variable req_num of Argument ds_file_in is needed. OUT_DSFILE structure is as follows:
typedef struct out_dsfile {
short year; /* Last Edit Time */
short mon; /* Last Edit Time */
short day; /* Last Edit Time */
short hour; /* Last Edit Time */
short min; /* Last Edit Time */
short sec; /* Last Edit Time */
long size; /* Size */
unsigned long attr; /* Attribute */
char file[36]; /* File Name */
char info[128]; /* Information */
} OUT_DSFILE
|
ERRORS
| Code | Description | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
|||||||||||||||||||||
| EW_BUSY |
DATA SERVER or embedded Ethernet is processing. |
|||||||||||||||||||||
| EW_LENGTH |
The Specification of req_num is wrong. |
|||||||||||||||||||||
| EW_NUMBER |
The Specification of size_type, detail is wrong. |
|||||||||||||||||||||
| EW_DTSRVR |
In order to get more information for this err_no return value,In order to get more information for this err_no return value,cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
data\cnc_rdrcvmsg
When this function is called, receipt status in CNC is cleared.
The receipt status of CNC becomes ON when it receives a message.
It becomes OFF when received message is read by "cnc_rdrcvmsg()" function or
when communication screen of the CNC is selected.
When a message which requires response is received, following
message is added in the receive buffer if a response is not returned within predetermined time.
"***** TIME OUT *****"
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdrcvmsg(unsigned short FlibHndl,char *rcvmsg);
ARGUMENTS
| Name | Direction | Description | ||
|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. |
||
| rcvmsg | out |
Series 15
Series 16/18, 16i/18i/21i
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The OSI-Ethernet option, and the extended driver/library function are necessary. |
| EW_REJECT |
OSI-Ethernet is initializing or restarting. |
data\cnc_rdrcvstat
"*****
TIME OUT
*****"
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdrcvstat(unsigned short FlibHndl, unsigned short *rcvstat);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| rcvstat | out |
Receipt status of message
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The OSI-Ethernet option, and the extended driver/library function are necessary. |
data\cnc_rdsndmsg
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdsndmsg(unsigned short FlibHndl,char *sndmsg);
ARGUMENTS
| Name | Direction | Description | ||
|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. |
||
| sndmsg | in |
sending message
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The OSI-Ethernet option, and the extended driver/library function are necessary. |
| EW_REJECT |
OSI-Ethernet is initializing or restarting. |
data\cnc_sendmessage
PROTOTYPE
FWLIBAPI short WINAPI cnc_sendmessage(unsigned short FlibHndl, char *msg);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| msg | in |
Sending message Message must be terminated with NULL character.Maximum length of the message including NULL is as follows. If the sending message is not terminated with NULL character, the operation of this function is not guaranteed. |
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The OSI-Ethernet option, and the extended driver/library function are necessary. |
| EW_DATA |
'NULL' character has been sent. |
| EW_REJECT |
OSI-Ethernet is initializing or restarting. |
data\cnc_wrcomparam
When communication parameters are written to OSI-Ethernet board following alarm will occur.
Series 15
PW000
Series 16/18, 16i/18i/21i
P/S000
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrcomparam(unsigned short FlibHndl, IODBCPRM *idb);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| idb | in |
typedef struct {
char NcApli[65] ;
char Dummy1 ;
char HostApli[65] ;
char Dummy2 ;
unsigned long StatPstv ;
unsigned long StatNgtv ;
unsigned long Statmask ;
unsigned long AlarmStat ;
unsigned long PsclHaddr ;
unsigned long PsclLaddr ;
unsigned short SvcMode1 ;
unsigned short SvcMode2 ;
long FileTout ;
long RemTout ;
} IODBCPRM ;
|
ERRORS
| Code | Description |
|---|---|
| EW_DATA |
Time-out parameter(FileTout, RemTout) is wrong. |
| EW_NOOPT |
The DNC1, DNC2, OSI-Ethernet option, and the extended driver/library function are necessary. |
| EW_PROT |
Protection KEY(DI/KEY2) is off. |
| EW_MODE |
The mode is not MDI. |
| EW_REJECT |
MDI operation is in progress. |
data\cnc_wrdncfname
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrdncfname(unsigned short FlibHndl, char *FileName);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| FileName | in |
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used at 15TT. |
| EW_NOOPT |
The DNC1, DNC2, OSI-Ethernet option, and the extended driver/library function are necessary. |
data\cnc_wrdsdncfile
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrdsdncfile(unsigned short FlibHndl, char *dev_name, char *dncfile);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| dev_name | in |
Specify the device name is as follows:
|
||||||
| dncfile | in |
The file name to receive 256 bytes or less of ASCII characters string including NULL. The file name to receive 128 bytes or less of ASCII characters string including NULL. It bocomes specfication of only a file name. A connection host number and a folder turn into the host number and current folder which are connected now. |
ERRORS
| Code | Description | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
|||||||||||||||||||||||||||
| EW_BUSY |
- Try again because DATA SERVER is processing. |
|||||||||||||||||||||||||||
| EW_DATA |
The Specification of dev_name is wrong. |
|||||||||||||||||||||||||||
| EW_DTSRVR |
In order to get more information for this err_no return value,In order to get more information for this err_no return value,cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
data\ds_cancel
When execution is discontinued by this function, not EW_OK but EW_RESET
is returned to the return value of this function. If the process of
the DATA SERVER had already ended when this function was executed, the
same value as ds_rdresult is returned to the this function.
In case of the execution of the above function, the DATA SERVER keeps
the state of the occupation until the execution is discontinued by this
function or the execution result(normal termination or the errors other
than EW_BUSY) is acquired by the ds_rdresult.
ds_delhddfile
Delete of file in hard disk
ds_copyhddfile
Copy of file in hard disk
ds_puthddfile
PUT of file in hard disk
ds_mputhddfile
MPUT of file in hard disk
ds_lputhddfile
LIST-PUT of file in hard disk
ds_ldelhddfile
LIST-DELETE of file in hard disk
ds_gethostfile
GET of host file
ds_mgethostfile
MGET of host file
ds_lgethostfile
LIST-GET of host file
This function is available even to "Fast Ethernet".
PROTOTYPE
FWLIBAPI short WINAPI ds_cancel(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
ERRORS
| Code | Description |
|---|---|
| EW_RESET |
The FTP command was stopped. |
| EW_FUNC |
The function for the DATA SERVER is not executed. |
| EW_NOOPT |
|
| EW_DTSRVR |
Error occurred in DATA SERVER. |
data\ds_checkhdd
PROTOTYPE
FWLIBAPI short WINAPI ds_checkhdd(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
|
| EW_REJECT |
The DATA SERVER is doing another processing. |
| EW_DTSRVR |
Error occurred in DATA SERVER. |
data\ds_chghdddir
This function is available even to "Fast Ethernet".
PROTOTYPE
FWLIBAPI short WINAPI ds_chghdddir(unsigned short FlibHndl, char *dir_name);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| dir_name | in |
Specify the pointer to the string where the directory name
which wants to change is stored. |
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
|
| EW_REJECT |
The DATA SERVER is doing another processing. |
| EW_DTSRVR |
Error occurred in DATA SERVER. |
data\ds_copyhddfile
In this function, the control returns to the application without only requesting the copy of the file to the DATA SERVER, and waiting for the end of the copy.
The final result can be acquired by ds_rdresult function.
When this function ends normally, the process of DATA SERVER is occupied by the requested work.
When the ds_rdresult is normal end or it returns the values other than EW_BUSY, this occupation are released.
When the process of requested work by this function is executing, the processing can be discontinued by ds_cancel.
When processing is discontinued, the occupation of the DATA SERVER is released.
PROTOTYPE
FWLIBAPI short WINAPI ds_copyhddfile(unsigned short FlibHndl, char *nc_srcfile, char *nc_dstfile);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| nc_srcfile | in |
The 63 characters from the head are recognized as file name, but the file name in DATA SERVER is managed by the format of 8.3. |
| nc_dstfile | in |
The 63 characters from the head are recognized as file name, but the file name in DATA SERVER is managed by the format of 8.3. |
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
|
| EW_REJECT |
The DATA SERVER is doing another processing. |
| EW_DTSRVR |
Error occurred in DATA SERVER. |
data\ds_delhdddir
PROTOTYPE
FWLIBAPI short WINAPI ds_delhdddir(unsigned short FlibHndl, char *dir_name);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| dir_name | in |
Specify the pointer to the string where the directory name which wants to be deleted is stored. The 63 characters from the head are recognized as file name, but the file name in DATA SERVER is managed by the format of 8.3. |
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
|
| EW_REJECT |
The DATA SERVER is doing another processing. |
| EW_DTSRVR |
Error occurred in DATA SERVER. |
data\ds_delhddfile
The some files can be deleted simultaneously by specifying wild-card("*","?").
In this function, the control returns to the application without only requesting the deletion of the file to the DATA SERVER, and waiting for the end of the deletion.
The final result can be acquired by ds_rdresult function.
When this function ends normally, the process of DATA SERVER is occupied by the requested work.
When the ds_rdresult is normal end or it returns the values other than EW_BUSY, this occupation are released.
When the process of requested work by this function is executing, the processing can be discontinued by ds_cancel.
When processing is discontinued, the occupation of the DATA SERVER is released.
This function is available even to "Fast Ethernet".
PROTOTYPE
FWLIBAPI short WINAPI ds_delhddfile(unsigned short FlibHndl, char *nc_file);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| nc_file | in |
The 63 characters from the head are recognized as file name, but the file name in DATA SERVER is managed by the format of 8.3. |
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
|
| EW_REJECT |
The DATA SERVER is doing another processing. |
| EW_DTSRVR |
Error occurred in DATA SERVER. |
data\ds_delhostfile
PROTOTYPE
FWLIBAPI short WINAPI ds_delhostfile(unsigned short FlibHndl, char *net_file, long timeout);
ARGUMENTS
| Name | Direction | Description | ||||
|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||
| net_file | in |
Specify the pointer to the string where the deleted file name (file name of the host computer) is stored. Specify the Ascii string less than 128 characters which included NULL. |
||||
| timeout | in |
Specify the time for timeout by the second. When 0 or less is specified, the timeout processing is not done. In the timeout processing, the following two kinds of return values might be returned.
When the power supply of the host computer is dropped at the time of communicating with the host, the timeout processing is executed. |
ERRORS
| Code | Description |
|---|---|
| EW_RESET |
The timeout processing was done while communicating with the host computer. |
| EW_NOOPT |
|
| EW_REJECT |
The DATA SERVER is doing another processing. |
| EW_DTSRVR |
Error occurred in DATA SERVER. |
data\ds_download
Outputs data to be registered(downloading).
The procedure of downloading is as follows.
PROTOTYPE
FWLIBAPI short WINAPI ds_download(unsigned short FlibHndl, long *number, char *data);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. |
| number | in/out |
Specify the ponter of the variable to the character length of NC data. This function returns EW_LENGTH if '*number' has the value of zero or negative. |
| data | in |
Specify the top address of data. |
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_FUNC |
|
||||||
| EW_LENGTH |
|
||||||
| EW_BUFFER |
Retry because the buffer is full. |
||||||
| EW_NOOPT |
|
||||||
| EW_REJECT |
The DATA SERVER is doing another processing. |
||||||
| EW_DTSRVR |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.As for the details, see "Ethernet Board/DATA SERVER Board OPERATOR'S MANUAL".
|
data\ds_dwnend
(This function must be executed after ds_download)
This function is only for "Fast Ethernet board". This function is not supported at "Embedded Ethernet" and "Ethernet board".
There are cases where errors during execution of downloading data returned by this function.
Further, this function does not return until the registration of the output data by ds_download is completed.
PROTOTYPE
FWLIBAPI short WINAPI ds_dwnend(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_FUNC |
|
||||||
| EW_NOOPT |
|
||||||
| EW_REJECT |
The DATA SERVER is doing another processing. |
||||||
| EW_DTSRVR |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.As for the details, see "Ethernet Board/DATA SERVER Board OPERATOR'S MANUAL".
|
data\ds_dwnstart
(This function must be executed before ds_download)
This function is only for "Fast Ethernet board". This function is not supported at "Embedded Ethernet" and "Ethernet board".
PROTOTYPE
FWLIBAPI short WINAPI ds_dwnstart(unsigned short FlibHndl, char *dtsv_file, short user);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| dtsv_file | in |
The specification of the file name of the DATA SERVER is as follows:
<ex.> "XXXXXXXX.XXX" + NULL However, the "O" number is managed as a file name now.<ex.> "O0001" + NULL |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| user | in |
DATA SERVER has 8 Task channels. The channel that a parsonal computer uses for transferring a file is specified by this "user". Available number is from 11 to 17. DATA SERVER can give 8 services for each user(NC, Personal computer, PMC, C-EXE). In order to decide which channel each user uses, it is necessary that NC parameters(No.941-948) are set with user's number as follows.
NC patameters(No.941-948) must be set before using this function(If these parameters are all invalid, CNC No.1 uses channel No.1). When you set this parameter for Personal computer function user(11-17), it is necessary to specify the channel of each path which CNC uses. When the user number is not set, the operation between CNC and the DATA SERVER cannot be done.
|
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_BUSY |
Terminate a downloading by using ds_dwnend function. |
||||||
| EW_PARAM |
|
||||||
| EW_NUMBER |
|
||||||
| EW_NOOPT |
|
||||||
| EW_REJECT |
The DATA SERVER is doing another processing. |
||||||
| EW_DTSRVR |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.As for the details, see "Ethernet Board/DATA SERVER Board OPERATOR'S MANUAL".
|
data\ds_formathdd
PROTOTYPE
FWLIBAPI short WINAPI ds_formathdd(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
|
| EW_REJECT |
The DATA SERVER is doing other processing. |
| EW_DTSRVR |
Error occurred in DATA SERVER. |
data\ds_gethostfile
The file of the host computer is transferred to the hard disk of the
DATA SERVER according to the "get" command of the FTP.
The wild-card("*", "?") cannot be used to specify the name.
In this function, the control returns to the application without only
ordering the transfer of the file according to the "get" command of
the FTP to the DATA SERVER, and waiting for the end of the processing.
The final result can be acquired by ds_rdresult function.
When this function ends normally, the process of DATA SERVER is
occupied by the requested work. When the ds_rdresult
is normal end or it returns the values other than EW_BUSY, this occupation are released.
PROTOTYPE
FWLIBAPI short WINAPI ds_gethostfile(unsigned short FlibHndl, char *net_file, char *nc_file);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| net_file | in |
Specify the pointer to the string where the file name of the transfer source(file name of the host computer) is stored. Specify the Ascii string less than 256 characters which included NULL. |
| nc_file | in |
Specify the pointer to the string where the file name of the transfer destination(file name in the hard disk of the data server) is stored. The 63 characters from the head are recognized as file name, but the file name in DATA SERVER is managed by the format of 8.3. |
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
|
| EW_REJECT |
The DATA SERVER is doing another processing. |
data\ds_ldelhddfile
The files in the hard disk of the DATA SERVER are deleted according to
the list file.
The wild-card("*", "?") cannot be used to specify the name.
In this function, the control returns to the application without only
ordering the deletion according to the list file to the DATA SERVER,
and waiting for the end of the processing.
The final result can be acquired by ds_rdresult function.
When this function ends normally, the process of DATA SERVER is
occupied by the requested work. When the ds_rdresult
is normal end or it returns the values other than EW_BUSY, this occupation are released.
PROTOTYPE
FWLIBAPI short WINAPI ds_ldelhddfile(unsigned short FlibHndl, char *nc_file);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| nc_file | in |
Specify the pointer to the string where the list file name is stored. The 63 characters from the head are recognized as file name, but the file name in DATA SERVER is managed by the format of 8.3. |
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The DATA SERVER function and the extended driver/library function are necessary. |
| EW_REJECT |
The DATA SERVER is doing another processing. |
| EW_DTSRVR |
Error occurred in DATA SERVER. |
data\ds_lgethostfile
The files in the host computer are transferred to the hard disk of the
DATA SERVER by the processing of FTP according to the list file.
The wild-card("*", "?") cannot be used to specify the name.
In this function, the control returns to the application without only
ordering the transfer by FTP according to the list file to the data
server, and waiting for the end of the processing.
The final result can be acquired by ds_rdresult function.
When this function ends normally, the process of DATA SERVER is
occupied by the requested work. When the ds_rdresult
is normal end or it returns the values other than EW_BUSY, this occupation are released.
PROTOTYPE
FWLIBAPI short WINAPI ds_lgethostfile(unsigned short FlibHndl, char* net_file);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| net_file | in |
Specify the pointer to the string where the list file(the file in host computer) name is stored. Specify the Ascii string less than 256 characters which included NULL. |
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
|
| EW_REJECT |
The DATA SERVER is doing another processing. |
| EW_DTSRVR |
Error occurred in DATA SERVER. |
data\ds_lputhddfile
The files in the hard disk of the DATA SERVER are transferred to the
host computer by the processing of FTP according to the list file.
The wild-card("*", "?") cannot be used to specify the name.
In this function, the control returns to the application without only
ordering the transfer by FTP according to the list file to the data
server, and waiting for the end of the processing.
The final result can be acquired by ds_rdresult function.
When this function ends normally, the process of DATA SERVER is
occupied by the requested work. When the ds_rdresult
is normal end or it returns the values other than EW_BUSY, this occupation are released.
PROTOTYPE
FWLIBAPI short WINAPI ds_lputhddfile(unsigned short FlibHndl, char *nc_file);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| nc_file | in |
Specify the pointer to the string where the list file name is stored. The 63 characters from the head are recognized as file name, but the file name in DATA SERVER is managed by the format of 8.3. |
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
|
| EW_REJECT |
The DATA SERVER is doing another processing. |
| EW_DTSRVR |
Error occurred in DATA SERVER. |
data\ds_makehdddir
PROTOTYPE
FWLIBAPI short WINAPI ds_makehdddir(unsigned short FlibHndl, char *dir_name);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| dir_name | in |
Specify the pointer to the string where the directory name which wants to be made is stored. The 63 characters from the head are recognized as file name, but the file name in DATA SERVER is managed by the format of 8.3. |
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
|
| EW_REJECT |
The DATA SERVER is doing another processing. |
| EW_DTSRVR |
Error occurred in DATA SERVER. |
data\ds_mgethostfile
The files of the host computer are transferred to the hard disk of the
DATA SERVER according to the "mget" command of the FTP.
The some files can be transferred simultaneously by specifying
wild-card("*","?").
In this function, the control returns to the application without only
requesting the transfer of the file according to the "mput" command of
the FTP to the DATA SERVER, and waiting for the end of the processing.
The final result can be acquired by ds_rdresult function.
When this function ends normally, the process of DATA SERVER is
occupied by the requested work. When the ds_rdresult
is normal end or it returns the values other than EW_BUSY, this occupation are released.
PROTOTYPE
FWLIBAPI short WINAPI ds_mgethostfile(unsigned short FlibHndl,char *net_file);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| net_file | in |
Specify the pointer to the string where the file name of the transfer source(file name of the host computer) is stored. Specify the Ascii string less than 256 characters which included NULL. |
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
|
| EW_REJECT |
The DATA SERVER is doing another processing. |
data\ds_mputhddfile
The files in the hard disk of the DATA SERVER are transferred to the
host computer according to the "mput" command of the FTP.
The some files can be transferred simultaneously by specifying wild-card("*","?").
In this function, the control returns to the application without only
requesting the transfer of the file according to the "mput" command of
the FTP to the DATA SERVER, and waiting for the end of the processing.
The final result can be acquired by ds_rdresult function.
When this function ends normally, the process of DATA SERVER is
occupied by the requested work. When ds_rdresult
is normal end or it returns the values other than EW_BUSY, this occupation are released.
PROTOTYPE
FWLIBAPI short WINAPI ds_mputhddfile(unsigned short FlibHndl, char *nc_file);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| nc_file | in |
Specify the pointer to the string where the file name(file name in the DATA SERVER) of the transfer source is stored. The 63 characters from the head are recognized as file name, but the file name in DATA SERVER is managed by the format of 8.3. |
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
|
| EW_REJECT |
The DATA SERVER is doing another processing. |
data\ds_puthddfile
The wild-card("*", "?") cannot be used to specify the name.
In this function, the control returns to the application without only requesting the transfer of the file according to the "put" command of the FTP to the DATA SERVER, and waiting for the end of the processing.
The final result can be acquired by ds_rdresult function.
When this function ends normally, the process of DATA SERVER is occupied by the requested work.
When the ds_rdresult is normal end or it returns the values other than EW_BUSY, this occupation are released.
When the process of requested work by this function is executing, the processing can be discontinued by ds_cancel.
When processing is discontinued, the occupation of the DATA SERVER is released.
PROTOTYPE
FWLIBAPI short WINAPI ds_puthddfile(unsigned short FlibHndl, char *net_file, char *nc_file);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| net_file | in |
Specify the Ascii string less than 256 characters which included NULL. |
| nc_file | in |
The 63 characters from the head are recognized as file name, but the file name in DATA SERVER is managed by the format of 8.3. |
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
|
| EW_REJECT |
The DATA SERVER is doing another processing. |
data\ds_rddnchddfile
PROTOTYPE
FWLIBAPI short WINAPI ds_rddnchddfile(unsigned short FlibHndl, char *dnc_hddfile);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| dnc_hddfile | out |
Specify the pointer to the string to store the file name which is acquired. The Ascii string less than 32 characters which included NULL is set. The file name is acquired with PATH. When the directory name is longer than 31 characters, the last 29 characters is acquired as follows. "." + "." + "last 29 characters" + NULL |
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
|
| EW_REJECT |
The DATA SERVER is doing another processing. |
| EW_DTSRVR |
Error occurred in DATA SERVER. |
data\ds_rddnchostfile
PROTOTYPE
FWLIBAPI short WINAPI ds_rddnchostfile(unsigned short FlibHndl, short *dnc_host, char *dnc_hostfile);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| dnc_host | out |
Specify the pointer to the variable to store the acquired host number.
The host number is as follows. |
| dnc_hostfile | out |
Specify the pointer to the Ascii string to store the acquired file name(file name in the host computer). The Ascii string less than 256 characters which included NULL is set. |
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
|
| EW_REJECT |
The DATA SERVER is doing another processing. |
| EW_DTSRVR |
Error occurred in DATA SERVER. |
data\ds_rdfile
This function is effective in only 16i/18i/21i. and, this function cannot be used with the 10BASE-5 board.
PROTOTYPE
FWLIBAPI short WINAPI ds_rdfile(unsigned short FlibHndl, char *dtsv_file, char *pc_file);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| dtsv_file | in |
The specification of the file name of the DATA SERVER is as follows:
<ex.> "XXXXXXXX.XXX" + NULL However, the "O" number is managed as a file name now.<ex.> "O0001" + NULL |
| pc_file | in |
The specification of the file name of the hard disk on personal computer is as follows:
|
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
|
||||||
| EW_NOOPT |
|
||||||
| EW_REJECT |
|
||||||
| EW_DTSRVR |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.As for the details, see "Ethernet Board/DATA SERVER Board OPERATOR'S MANUAL".
|
data\ds_rdhdddir
Get the file information at each file.
This function is available even to "Fast Ethernet".
PROTOTYPE
FWLIBAPI short WINAPI ds_rdhdddir(unsigned short FlibHndl, char *nc_file, long offset, short *number, ODBHDDDIR *hdddir);
ARGUMENTS
| Name | Direction | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||
| nc_file | in |
The 63 characters from the head are recognized as file name, but the file name in DATA SERVER is managed by the format of 8.3. When the '\0' is specified, the process is done assuming that the file of the top in the work directory is specified. |
||||||||
| offset | in |
The file information is acquired from the position where the number of files specified by this data was skipped. When the file name or the '\0' is specified for the based file name and the number of offsets which does not exist in the DATA SERVER is given, the last file information in the work directory is got. When NULL is specified for the based file name and the number of offsets which does not exist in the DATA SERVER is given, the EW_NUMBER is returned. |
||||||||
| number | in/out |
Specify the 1 to 32 for this data. This function returns the number of data which was acquired actually. |
||||||||
| hdddir | out |
typedef struct _odbhdddir {
char file_name[64];
char comment[80];
short attribute;
short reserved;
long size;
char date[16];
} ODBHDDDIR;
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
The number of file information(*number) is wrong. |
| EW_NUMBER |
When the based file name is NULL, the number(offset) of offsets which does not exist in the DATA SERVER is given. |
| EW_NOOPT |
|
| EW_REJECT |
The DATA SERVER is doing another processing. |
| EW_DTSRVR |
Error occurred in DATA SERVER. |
data\ds_rdhddinfo
Get the information of hard disk of DATA SERVER.
The following information can be acquired.
PROTOTYPE
FWLIBAPI short WINAPI ds_rdhddinfo(unsigned short FlibHndl, ODBHDDINF *hddinfo);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| hddinfo | out |
Specify the pointer to ODBHDDINF structure to store the directory information which is acquired. The ODBHDDINF structure is as follows.
typedef struct _odbhddinf {
long file_num;
long remainder_l;
long remainder_h;
char current_dir[32];
} ODBHDDINF;
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
|
| EW_REJECT |
The DATA SERVER is doing another processing. |
| EW_DTSRVR |
Error occurred in DATA SERVER. |
data\ds_rdhostdir
PROTOTYPE
FWLIBAPI short WINAPI ds_rdhostdir(unsigned short FlibHndl, short type,
long offset, short *number, ODBHOSTDIR *hostdir, long timeout);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| type | in |
|
||||||
| offset | in |
Specify the number of offset files from top file of the file information which wants to be acquired. |
||||||
| number | in/out |
Specify the pointer to the variable where the number of file information which wants to be acquired was setted. Specify the 1 to 32 for this data. This function returns the number of data which was acquired actually. |
||||||
| hostdir | out |
Specify the pointer to the ODBHOSTDIR structure to store the file information which is acquired. The ODBHOSTDIR structure is as follows.
typedef struct _odbhostdir {
char host_file[128];
} ODBHOSTDIR;
|
||||||
| timeout | in |
Specify the time for timeout by the second. When 0 or less is specified, the timeout processing is not done. In the timeout processing, the following two kinds of return values might be returned.
|
ERRORS
| Code | Description |
|---|---|
| EW_RESET |
The timeout processing was done while communicating with the host computer. |
| EW_LENGTH |
The number of file information(*number) is wrong. |
| EW_NUMBER |
the number(offset) of offsets which does not exist is given. |
| EW_ATTRIB |
The type of file information(type) is wrong. |
| EW_NOOPT |
|
| EW_REJECT |
The DATA SERVER is doing another processing. |
| EW_DTSRVR |
Error occurred in DATA SERVER. |
data\ds_rdhostdir2
PROTOTYPE
FWLIBAPI short WINAPI ds_rdhostdir2(unsigned short FlibHndl, short type, long offset,
short *number, long *hostinfo, ODBHOSTDIR *hostdir, long timeout);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| type | in |
|
||||||
| offset | in |
Specify the number of offset files from top file of the file information which wants to be acquired. |
||||||
| number | in/out |
Specify the pointer to the variable where the number of file information which wants to be acquired was setted. Specify the 1 to 32 for this data. This function returns the number of data which was acquired actually. |
||||||
| hostinfo | out |
Specify the pointer to the variable to store the host information(nunbers of file) which is acquired. |
||||||
| hostdir | out |
Specify the pointer to the ODBHOSTDIR structure to store the file information which is acquired. The ODBHOSTDIR structure is as follows.
typedef struct _odbhostdir {
char host_file[128];
} ODBHOSTDIR;
|
||||||
| timeout | in |
Specify the time for timeout by the second. When 0 or less is specified, the timeout processing is not done. In the timeout processing, the following two kinds of return values might be returned.
|
ERRORS
| Code | Description |
|---|---|
| EW_RESET |
The timeout processing was done while communicating with the host computer. |
| EW_LENGTH |
The number of file information(*number) is wrong. |
| EW_NUMBER |
the number(offset) of offsets which does not exist is given. |
| EW_ATTRIB |
The type of file information(type) is wrong. |
| EW_NOOPT |
|
| EW_REJECT |
The DATA SERVER is doing another processing. |
| EW_DTSRVR |
Error occurred in DATA SERVER. |
data\ds_rdhostinfo
Get the information of login directory of the host computer.
PROTOTYPE
FWLIBAPI short WINAPI ds_rdhostinfo(unsigned short FlibHndl, long *hostinfo, long timeout);
ARGUMENTS
| Name | Direction | Description | ||||
|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||
| hostinfo | out |
Specify the pointer to the variable to store the host information(nunbers of file) which is acquired. |
||||
| timeout | in |
Specify the time for timeout by the second. When 0 or less is specified, the timeout processing is not done. In the timeout processing, the following two kinds of return values might be returned.
When the power supply of the host computer is dropped at the time of communicating with the host, the timeout processing is executed. |
ERRORS
| Code | Description |
|---|---|
| EW_RESET |
The timeout processing was done while communicating with the host computer. |
| EW_NOOPT |
|
| EW_REJECT |
The DATA SERVER is doing another processing. |
| EW_DTSRVR |
Error occurred in DATA SERVER. |
data\ds_rdhostno
PROTOTYPE
FWLIBAPI short WINAPI ds_rdhostno(unsigned short FlibHndl, short *host_no);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| host_no | out |
Specify the pointer to the variable to store the host number.
The host number is as follows. |
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
|
| EW_REJECT |
The DATA SERVER is doing another processing. |
| EW_DTSRVR |
Error occurred in DATA SERVER. |
data\ds_rdm198hdddir
PROTOTYPE
FWLIBAPI short WINAPI ds_rdm198hdddir(unsigned short FlibHndl, char *m198_dir);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| m198_dir | out |
Specify the pointer to the character string to store the work directory which is acquired. The Ascii string less than 32 characters which included NULL is set. The directory name is acquired with PATH. When the directory name is longer than 31 characters, the last 29 characters is acquired as follows. "." + "." + "last 29 characters" + NULL |
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
|
| EW_REJECT |
The DATA SERVER is doing another processing. |
| EW_DTSRVR |
Error occurred in DATA SERVER. |
data\ds_rdm198host
PROTOTYPE
FWLIBAPI short WINAPI ds_rdm198host(unsigned short FlibHndl, short *host_no);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| host_no | in |
Specify the pointer to the variable to store the acquired host number. The host number is as follows. 1 : Server No.12 : Server No.2 3 : Server No.3 |
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
|
| EW_REJECT |
The DATA SERVER is doing another processing. |
| EW_DTSRVR |
Error occurred in DATA SERVER. |
data\ds_rdmntinfo
The data for troubleshooting is acquired as maintenance information for
the file transfer between the DATA SERVER and CNC.
The maximum channel number for the file transfer between the data
server and CNC is 8. Which channel is used for each path of CNC can
be set in CNC parameter No.941-948.
Number of data delay
Number of transferring total bytes
Read pointer
Write pointer
PROTOTYPE
FWLIBAPI short WINAPI ds_rdmntinfo(unsigned short FlibHndl, short ch_no, DSMNTINFO *mnt_info);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| ch_no | in |
Specify the channel number of maintenance information which wants to be acquired. For this data, the number from 1 to number of channel can specify. The number of channels can be acquired by etb_rdparam. |
| mnt_info | out |
Specify the pointer to DSMNTINFO structure to store the maintenance information which is acquired. The DSMNTINFO structure is as follows.
typedef struct _dsmntinfo {
unsigned short empty_cnt;
unsigned long total_size;
unsigned short ReadPtr;
unsigned short WritePtr;
} DSMNTINFO;
|
ERRORS
| Code | Description |
|---|---|
| EW_NUMBER |
Channel number(ch_no) is wrong. |
| EW_NOOPT |
|
| EW_REJECT |
The DATA SERVER is doing another processing. |
data\ds_rdmode
PROTOTYPE
FWLIBAPI short WINAPI ds_rdmode(unsigned short FlibHndl, short *dsmode);
ARGUMENTS
| Name | Direction | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||
| dsmode | out |
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
|
data\ds_rdncfile
The wild-card("*", "?") cannot be used to specify the name.
PROTOTYPE
FWLIBAPI short WINAPI ds_rdncfile(unsigned short FlibHndl, short type,char *file_name);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
|
| type | in |
When the value of excepting 0 is specified, EW_ATTRIB error occurs. |
| file_name | in |
|
ERRORS
| Code | Description |
|---|---|
| EW_RESET |
Process is canceled by [RESET]. |
| EW_BUSY |
The CNC state is as follows. |
| EW_NUMBER |
The specified file does not exist in the DATA SERVER. |
| EW_ATTRIB |
The file type(type) is wrong. |
| EW_DATA |
The program has already been registered. |
| EW_NOOPT |
|
| EW_OVRFLOW |
|
| EW_DTSRVR |
Error occurred in DATA SERVER. |
data\ds_rdncfile2
When the O number of file name in the DATA SERVER and the O number in
contents of file is different, O number is registered according to the
ONS(No.900#1) of CNC parameter.
PROTOTYPE
FWLIBAPI short WINAPI ds_rdncfile2(unsigned short FlibHndl, char *file_name);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| file_name | in |
Specify the pointer to the string where the file name(file name in the DATA SERVER) which wants to be inputted to the NC is stored. The format of file name is as follows.
So, the NC program registered by the file names other than the above-format cannot be input. The wild-card("*", "?") cannot be used to specify the name. |
ERRORS
| Code | Description |
|---|---|
| EW_RESET |
Process is canceled by [RESET]. |
| EW_BUSY |
The CNC state is as follows. |
| EW_NUMBER |
The file name(file_name) is wrong. Specify the following format. |
| EW_DATA |
|
| EW_NOOPT |
|
| EW_PROT |
|
| EW_OVRFLOW |
|
| EW_DTSRVR |
Error occurred in DATA SERVER. |
data\ds_rdresult
In case of the execution of the above function, the DATA SERVER keeps
the state of the occupation until the execution result(normal
termination or the errors other than EW_BUSY) of the function is
acquired by this function or the execution is discontinued by
ds_cancel.
ds_delhddfile
Delete of file in hard disk
ds_copyhddfile
Copy of file in hard disk
ds_puthddfile
PUT of file in hard disk
ds_mputhddfile
MPUT of file in hard disk
ds_lputhddfile
LIST-PUT of file in hard disk
ds_ldelhddfile
LIST-DELETE of file in hard disk
ds_gethostfile
GET of host file
ds_mgethostfile
MGET of host file
ds_lgethostfile
LIST-GET of host file
When this function retuens EW_DTSRVR error, in order to get more information for this err_no return value, execute cnc_getdtailerr function.
The following detail status will be set onto the member, err_no of ODBERR structure.
Function Name
Detail
Meaning
ds_delhddfile
0xfe07
Deletion failed.
ds_copyhddfile
0xfe0f
The file of the same name was found.
0xfe15
Copy failed.
ds_puthddfile
0xfe01
Mistake of parameter for connected host.
0xfe04
User name/Password is wrong.
0xfe0a
File PUT failed.
0xfe12
File not found
0xfe2b
FTP not ready
0xfe03
Connection error to FTP server.
0xfe05
0xfe06
0xfe2c
0xfe2d
The server or the router is not found.
ds_mputhddfile
0xfe01
Mistake of parameter for connected host.
0xfe04
User name/Password is wrong.
0xfe0a
MPUT failed.
0xfe23
0xfe2b
FTP not ready
0xfe03
Connection error to FTP server.
0xfe05
0xfe06
0xfe2c
0xfe2d
The server or the router is not found.
ds_gethostfile
0xfe01
Mistake of parameter for connected host.
0xfe04
User name/Password is wrong.
0xfe09
File GET failed.
0xfe0f
The file of the same name was found.
0xfe2b
FTP not ready
0xfe03
Connection error to FTP server.
0xfe05
0xfe06
0xfe2c
0xfe2d
The server or the router is not found.
ds_mgethostfile
0xfe01
Mistake of parameter for connected host.
0xfe04
User name/Password is wrong.
0xfe09
MGET failed.
0xfe22
0xfe2b
FTP not ready
0xfe03
Connection error to FTP server.
0xfe05
0xfe06
0xfe2c
0xfe2d
The server or the router is not found.
ds_lputhddfile
0xfe01
Mistake of parameter for connected host.
0xfe04
User name/Password is wrong.
0xfe0a
List-Put failed.
0xfe10
0xfe24
0xfe0c
File open failed.
0xfe12
File not found.
0xfe28
List format error.
0xfe2b
FTP not ready
0xfe03
Connection error to FTP server.
0xfe05
0xfe06
0xfe2c
0xfe2d
The server or the router is not found.
ds_ldelhddfile
0xfe0c
File open failed.
0xfe10
List-Delete failed.
0xfe24
0xfe27
0xfe28
List format error.
ds_lgethostfile
0xfe01
Mistake of parameter for connected host.
0xfe04
User name/Password is wrong.
0xfe09
List-Get failed.
0xfe10
0xfe24
0xfe25
0xfe0c
File open failed.
0xfe0f
The file of the same name was found.
0xfe28
List format error.
0xfe2b
FTP not ready
0xfe03
Connection error to FTP server.
0xfe05
0xfe06
0xfe2c
0xfe2d
The server or the router is not found.
This function is available even to "Fast Ethernet".
PROTOTYPE
FWLIBAPI short WINAPI ds_rdresult(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
ERRORS
| Code | Description |
|---|---|
| EW_BUSY |
The function for the DATA SERVER has already been executed. |
| EW_FUNC |
The function for the DATA SERVER is not executed. |
| EW_NOOPT |
|
| EW_DTSRVR |
Error occurred in DATA SERVER. |
data\ds_renhddfile
PROTOTYPE
FWLIBAPI short WINAPI ds_renhddfile(unsigned short FlibHndl, char *nc_srcfile, char *nc_dstfile);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| nc_srcfile | in |
The 63 characters from the head are recognized as file name, but the file name in DATA SERVER is managed by the format of 8.3. |
| nc_dstfile | in |
The 63 characters from the head are recognized as file name, but the file name in DATA SERVER is managed by the format of 8.3. |
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
|
| EW_REJECT |
The DATA SERVER is doing another processing. |
| EW_DTSRVR |
Error occurred in DATA SERVER. |
data\ds_searchresult
Gets the result of ds_searchword function.
PROTOTYPE
FWLIBAPI short WINAPI ds_searchresult(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
ERRORS
| Code | Description |
|---|---|
| EW_BUSY |
CNC is searching the program text right now. |
| EW_FUNC |
|
| EW_DATA |
The target string to search is not found. |
| EW_NOOPT |
The extended driver/library function and the DATA SERVER function are necessary. |
data\ds_searchword
The string of the NC program in DATA SERVER at the running of M198/DNC in MEM/RMT mode is searched. The basic order to search is as follows.
The result of search can be confirmed by ds_searchresult.
When the specified string is found, the pointer moves to the found line.
PROTOTYPE
FWLIBAPI short WINAPI ds_searchword(unsigned short FlibHndl, char *prog_data);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| prog_data | in |
Specify the pointer to the buffer holding the target string to search.
The top of search string should be the following characters.
|
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_BUSY |
Some alarm has existed or CNC is searching the program text right now. |
|||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
|
|||||||||
| EW_PARAM |
Parameter No.900#2 is off. |
|||||||||
| EW_NOOPT |
The extended driver/library function and the DATA SERVER function are necessary. |
|||||||||
| EW_MODE |
CNC mode is not MEM or RMT mode. |
|||||||||
| EW_REJECT |
- The DATA SERVER is not mounted. - It is not the program within the DATA SERVER. - CNC is running. |
|||||||||
| EW_STOP |
CNC is in the emergency stop or feed fold is ON. |
data\ds_wrdnchddfile
The file name in the hard disk of the DATA SERVER for DNC operation is set.
PROTOTYPE
FWLIBAPI short WINAPI ds_wrdnchddfile(unsigned short FlibHndl, char *dnc_hddfile);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| dnc_hddfile | in |
Specify the pointer to the character string where the file name (file name in the hard disk of the DATA SERVER) which wants to be set is stored. The 63 characters from the head are recognized as file name, but the file name in DATA SERVER is managed by the format of 8.3. |
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
|
| EW_REJECT |
The DATA SERVER is doing another processing. |
| EW_DTSRVR |
Error occurred in DATA SERVER. |
data\ds_wrdnchostfile
The file name of the host computer for DNC operation is set.
PROTOTYPE
FWLIBAPI short WINAPI ds_wrdnchostfile(unsigned short FlibHndl, char *dnc_hostfile);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| dnc_hostfile | in |
Specify the pointer to the string where the file name(file name in the host computer) which wants to be set is stored. Specify the Ascii string less than 256 characters which included NULL. |
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
|
| EW_REJECT |
The DATA SERVER is doing another processing. |
| EW_DTSRVR |
Error occurred in DATA SERVER. |
data\ds_wrfile
This function is effective in only 16i/18i/21i. and, this function cannot be used with the 10BASE-5 board.
PROTOTYPE
FWLIBAPI short WINAPI ds_wrfile(unsigned short FlibHndl, char *pc_file, char *dtsv_file);
ARGUMENTS
| Name | Direction | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||
| pc_file | in |
|
||||||||||
| dtsv_file | in |
|
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
|
||||||
| EW_NOOPT |
|
||||||
| EW_REJECT |
|
||||||
| EW_DTSRVR |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.As for the details, see "Ethernet Board/DATA SERVER Board OPERATOR'S MANUAL".
|
data\ds_wrhostno
PROTOTYPE
FWLIBAPI short WINAPI ds_wrhostno(unsigned short FlibHndl, short host_no);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| host_no | in |
Specify the host number which wants to connect. The host number which can be specified is as follows. 1 : Server No.12 : Server No.2 3 : Server No.3 |
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
|
| EW_REJECT |
The DATA SERVER is doing another processing. |
| EW_DTSRVR |
Error occurred in DATA SERVER. |
data\ds_wrm198hdddir
The work directory for the M198(subprogram call) is set.
The current directory in the hard disk of the DATA SERVER is set as the
work directory for the M198.
PROTOTYPE
FWLIBAPI short WINAPI ds_wrm198hdddir(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
|
| EW_REJECT |
The DATA SERVER is doing another processing. |
| EW_DTSRVR |
Error occurred in DATA SERVER. |
data\ds_wrm198host
Connected host number for the M198(subprogram call) is set.
PROTOTYPE
FWLIBAPI short WINAPI ds_wrm198host(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
|
| EW_REJECT |
The DATA SERVER is doing another processing. |
| EW_DTSRVR |
Error occurred in DATA SERVER. |
data\ds_wrmode
When the hard drive is not mounted, the mode automatically becomes the FTP mode.
Storage mode
Buffer mode
FTP mode
PROTOTYPE
FWLIBAPI short WINAPI ds_wrmode(unsigned short FlibHndl, short dsmode);
ARGUMENTS
| Name | Direction | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||
| dsmode | in |
|
ERRORS
| Code | Description |
|---|---|
| EW_DATA |
The mode(dsmode) of DATA SERVER is wrong. |
| EW_NOOPT |
|
| EW_MODE |
CNC mode is not MDI mode. |
| EW_REJECT |
The DATA SERVER is doing another processing. |
| EW_DTSRVR |
Error occurred in DATA SERVER. |
data\ds_wrncfile
The wild-card("*", "?") cannot be used to specify the name.
PROTOTYPE
FWLIBAPI short WINAPI ds_wrncfile(unsigned short FlibHndl, short type, long prog_no);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| type | in |
Specify the file type.
* When type=1 is specified, program number (prog_no) is disregarded. And, the file name becomes "ALLPRG". |
||||||
| prog_no | in |
Specify the pointer to the string where the file name which wants to be outputted to the DATA SERVER is stored. The file by which the specified number is assumed to be a file name is made on the DATA SERVER. |
ERRORS
| Code | Description |
|---|---|
| EW_RESET |
Process is canceled by [RESET]. |
| EW_BUSY |
The CNC state is as follows. |
| EW_NUMBER |
The specified file has already been registered in the DATA SERVER. |
| EW_ATTRIB |
The file type(type) is wrong. |
| EW_DATA |
The program is not registered. |
| EW_NOOPT |
|
| EW_PROT |
The program is protected. |
| EW_REJECT |
The DATA SERVER is doing another processing. |
| EW_DTSRVR |
Error occurred in DATA SERVER. |
data\etb_rderrmsg
Get the error message which occurred in the Ethernet board.
This function acquires the error message of the Ethernet board with the
unit of a screen(38 characters * 10 lines).
The total of error message screen can be acquired by
etb_rdparam.
The following message information can be acquired.
PROTOTYPE
FWLIBAPI short WINAPI etb_rderrmsg(unsigned short FlibHndl, short page_no, ODBETMSG *err_msg);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| page_no | in |
Specify the screen number for error message. Specify from 1 to number of total for screen number. |
| err_msg | out |
Specify the pointer to ODBTMSG structure to store the message which is acquired. The ODBETMSG structure is as follows.
typedef struct _odbetmsg {
char title[33];
char message[10][39];
} ODBETMSG;
|
ERRORS
| Code | Description |
|---|---|
| EW_NUMBER |
The screen number(page_no) is wrong. |
| EW_NOOPT |
|
data\etb_rdparam
Get the parameter of ethernet board.
The following parameter can be acquired by this function.
PROTOTYPE
FWLIBAPI short WINAPI etb_rdparam(unsigned short FlibHndl, short type , IODBETP *param);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||
| type | in |
Specify the parameter type which wants to be acquired. Specify the following type.
|
||||||||||||||||||
| param | out |
Specify the pointer to IODBETP structure to store the acquired parameter. IODBETP structure is as follows.
typedef struct _iodbetp {
short ParameterType;
union {
TCPPRM tcp;
HOSTPRM host;
FTPPRM ftp;
ETBPRM etb;
} prm;
} ETBPARAM;
typedef struct _tcpprm {
char OwnIPAddress[16];
char SubNetMask[16];
char RouterIPAddress[16];
} TCPPRM;
typedef struct _hostprm {
unsigned short DataServerPort;
char DataServerIPAddress[16];
char DataServerUserName[32];
char DataServerPassword[32];
char DataServerLoginDirectory[128];
} HOSTPRM;
typedef struct _ftpprm {
char FTPServerUserName[32];
char FTPServerPassword[32];
char FTPServerLoginDirectory[128];
} FTPPRM;
typedef struct _etbprm {
char OwnMACAddress[13];
short MaximumChannel;
short HDDExistence;
short NumberOfScreens;
} ETBPRM;
|
ERRORS
| Code | Description |
|---|---|
| EW_ATTRIB |
Parameter type(type) is wrong. |
| EW_NOOPT |
|
data\etb_wrparam
The parameter for Ethernet function cannot be set.
PROTOTYPE
FWLIBAPI short WINAPI etb_wrparam(unsigned short FlibHndl , IODBETP *param);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||
| param | in |
Specify the pointer to IODBETP structure where the parameter is stored.
typedef struct _iodbetp {
short ParameterType;
union {
TCPPRM tcp;
HOSTPRM host;
FTPPRM ftp;
ETBPRM etb;
} prm;
} ETBPARAM;
typedef struct _tcpprm {
char OwnIPAddress[16];
char SubNetMask[16];
char RouterIPAddress[16];
} TCPPRM;
typedef struct _hostprm {
unsigned short DataServerPort;
char DataServerIPAddress[16];
char DataServerUserName[32];
char DataServerPassword[32];
char DataServerLoginDirectory[128];
} HOSTPRM;
typedef struct _ftpprm {
char FTPServerUserName[32];
char FTPServerPassword[32];
char FTPServerLoginDirectory[128];
} FTPPRM;
typedef struct _etbprm {
char OwnMACAddress[13];
short MaximumChannel;
short HDDExistence;
short NumberOfScreens;
} ETBPRM;
The following data is unused because the Ethernet function cannot be set.
param.etbprm.MaximumChannel param.etbprm.HDDExistence param.etbprm.NumberOfScreens |
ERRORS
| Code | Description |
|---|---|
| EW_ATTRIB |
The value of ParameterType is wrong. |
| EW_NOOPT |
|
| EW_PROT |
Setting parameter is protected. |
| EW_MODE |
CNC mode is not MDI mode. |
| EW_REJECT |
The DATA SERVER is doing another processing. |
| EW_DTSRVR |
Error occurred in DATA SERVER. |
data\eth_clrlog
Clear the logs for Ethernet function : Embedded Ethernet[Internal port ,PCMCIA Card], Fast Ethernet board, Fast DATA SERVER board, Windows CE Embedded Ethernet[Internal port ,PCMCIA Card]
PROTOTYPE
FWLIBAPI short WINAPI eth_clrlog(unsigned short FlibHndl, short type);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||
| type | in |
Kind of clearing log is as follows.
|
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
|||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
data\eth_dschkdsk
Check disk of ATA card on DATA SERVER.
PROTOTYPE
FWLIBAPI short WINAPI eth_dschkdsk(unsigned short FlibHndl, short *result);
ARGUMENTS
| Name | Direction | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||
| result | out |
Get the format of ATA card on DATA SERVER.
|
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
data\eth_dsformat
Format ATA card on DATA SERVER.
PROTOTYPE
FWLIBAPI short WINAPI eth_dsformat(unsigned short FlibHndl, short type, short *result);
ARGUMENTS
| Name | Direction | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||
| type | in |
Specify ATA card format on DATA SERVER.
|
|||||||||
| result | out |
Get the result of ATA card formatted on DATA SERVER.
|
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
|||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
data\eth_rddsformat
Get the format of ATA card on DATA SERVER.
PROTOTYPE
FWLIBAPI short WINAPI eth_rddsformat(unsigned short FlibHndl, short *type);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| type | out |
Get the format of ATA card on DATA SERVER.
|
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
data\eth_rddsm198dir
Get the work folder for the M198 on DATA SERVER using Strage mode.
PROTOTYPE
FWLIBAPI short WINAPI eth_rddsm198dir(unsigned short FlibHndl, short path, char *dir);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| path | in |
It is able to set from 1 to 10. |
| dir | out |
The Ascii string less than 256 characters which is included NULL. |
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
||||||
| EW_PATH |
|
data\eth_rddsm198host
Get the connected host number and work folder for the M198 on DATA SERVER using FTP mode.
PROTOTYPE
FWLIBAPI short WINAPI eth_rddsm198host(unsigned short FlibHndl, short path, short *host, char *dir);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| path | in |
It is able to set from 1 to 10. |
| host | out |
It is able to get the number from 1 to 3. |
| dir | out |
The Ascii string less than 256 characters which is included NULL. |
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
||||||
| EW_PATH |
|
data\eth_rddsmode
Get the all channel modes on DATA SERVER.
PROTOTYPE
FWLIBAPI short WINAPI eth_rddsmode(unsigned short FlibHndl, OUT_ETHDSMODE *mode);
ARGUMENTS
| Name | Direction | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||
| mode | out |
The IN_ETHPRM structure is as follows.
typedef struct _out_ethdsmode {
short DsMode[10];
} OUT_ETHDSMODE;
DATA SERVER mode is as follows.
|
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
data\eth_rddsstate
Get each path of maintenance information on DATA SERVER.
PROTOTYPE
FWLIBAPI short WINAPI eth_rddsstate(unsigned short FlibHndl, short path, OUT_DSSTATE *dsstate);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||
| path | in |
It is able to set from 1 to 10. |
||||||||||||||||||||
| dsstate | out |
The OUT_DSSTATE structure is as follows.
typedef struct _out_dsstate {
short DtsvrChannel;
short pad;
short Mode;
unsigned short EmptyCount;
unsigned long TotalSize;
unsigned short WritePtr;
unsinged short ReadPtr;
} OUT_DSSTATE;
|
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
||||||
| EW_PATH |
|
data\eth_rdhost
Get the host number selected current Ethernet function.
PROTOTYPE
FWLIBAPI short WINAPI eth_rdhost(unsigned short FlibHndl, short type, short *host);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||
| type | in |
Kind of communication function is as follows.
|
|||||||||||||||
| host | out |
Return from 1 to 3. |
ERRORS
| Code | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
||||||||||||
| EW_FUNC |
Acquiring of parameter is failed. In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
data\eth_rdlog
PROTOTYPE
FWLIBAPI short WINAPI eth_rdlog(unsigned short FlibHndl, short type, short startMsgNumber short msgCount, OUT_ETHLOG *log);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type | in |
The kind of log which can be taken out is as follows:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| startMsgNumber | in |
First number of log message to take out The ethernet function has secured data which is 300 message in all. 0 is latest log message. 299 is earliest log message. Range 0,..,299 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| msgCount | in |
Number of log message to take out Range 1,..,15 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| log | out |
Specify the pointer to the OUT_ETHLOG structure that stores getting log. The OUT_ETHLOG structure is as follows:
typedef struct _out_ethlog {
short Count;
char reserve[14];
OUT_ETHLOG1SHOT logData[15];
} OUT_ETHLOG;
typedef struct _out_ethlog1shot {
short Type;
unsigned short MsgId;
unsigned char Year;
unsigned char Month;
unsigned char Day;
unsigned char Hour;
unsigned char Minute
unsigned char Second;
char reserve[2];
char Text[84];
} OUT_ETHLOG1SHOT;
|
ERRORS
| Code | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
||||||||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
data\eth_rdparam
Get the parameters for Ethernet function : Fast Ethernet board, Fast DATA SERVER board
PROTOTYPE
FWLIBAPI short WINAPI eth_rdparam(unsigned short FlibHndl, short type, OUT_ETHPRM *param);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type | in |
Kind of a parameter to be received is as follows.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| param | out |
The OUT_ETHPRMFLAG structure is as follows.
typedef struct _out_ethprm {
unsigned short Option;
short Type;
short Dhcp;
short ValidDevice;
short DtsvrChannel;
short Storage;
union {
COMMON_PRM common;
FOCAS2_PRM focas2;
FTPTRANS_PRM ftpTrans;
DTSVR_PRM dataServer;
} prm;
} OUT_ETHPRM;
typedef struct _common_prm {
char OwnMacAddress[13];
char OwnIpAddress[40];
char SubNetmask[16];
char RouterIpAddress[40];
char DnsServer1IpAddress[40];
char DnsServer2IpAddress[40];
char OwnHostName[32];
char OwnDomain[63];
} COMMON_PRM; /* Common parameter */
typedef struct _focas2_prm {
unsigned long TcpPort;
unsigned long UdpPort;
unsigned long TimeInterval;
} FOCAS2_PRM; /* Parameter for FOCAS2/Ethernet */
typedef struct _ftptrans_prm {
FTP_CLIENT_PRM opposite[3];
} FTPTRANS_PRM; /* Parameter for FTP transfer */
typedef struct _dtsvr_prm {
FTP_CLIENT_PRM opposite[3];
FTP_SERVER_PRM own;
} DTSVR_PRM; /* Parameter for DATA SERVER */
typedef struct _ftp_client_prm {
char HostName[64];
unsigned long ControlPort;
unsigned long Dummy;
char UserName[32];
char Password[32];
char LoginDirectory[128];
} FTP_CLIENT_PRM;
typedef struct _ftp_server_prm {
char UserName[32];
char Password[32];
char LoginDirectory[128];
} FTP_SERVER_PRM
|
ERRORS
| Code | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
||||||||||||
| EW_FUNC |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
data\eth_wrdsm198dir
Set the work folder for the M198 on DATA SERVER using Strage mode.
PROTOTYPE
FWLIBAPI short WINAPI eth_wrdsm198dir(unsigned short FlibHndl, short path, char *dir);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| path | in |
It is able to set from 1 to 10. |
| dir | in |
The Ascii string less than 256 characters which is included NULL. |
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
||||||
| EW_PROT |
Writing to the parameter is failed. In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
||||||
| EW_PATH |
|
data\eth_wrdsm198host
Set the connected host number and work folder for the M198 on DATA SERVER using FTP mode.
PROTOTYPE
FWLIBAPI short WINAPI eth_wrdsm198host(unsigned short FlibHndl, short path, short host, char *dir);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| path | in |
It is able to set from 1 to 10. |
| host | in |
It is able to set the number from 1 to 3. |
| dir | in |
The Ascii string less than 256 characters which included NULL. |
ERRORS
| Code | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
||||||||||||
| EW_PROT |
Writing to the parameter is failed. In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
||||||||||||
| EW_PATH |
|
data\eth_wrdsmode
Change the mode for DATA SERVER function.
PROTOTYPE
FWLIBAPI short WINAPI eth_wrdsmode(unsigned short FlibHndl, short path, short mode);
ARGUMENTS
| Name | Direction | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||
| path | in |
Specify the channel number to change. It is able to change from 0 to 10. In case of setting 0(zero), all channel modes are changed. |
|||||||||
| mode | in |
Available DATA SERVER function mode is as follows.
|
ERRORS
| Code | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
||||||||||||
| EW_FUNC |
Acquiring of parameter is failed. In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
||||||||||||
| EW_PROT |
Writing to the parameter is failed. In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
||||||||||||
| EW_PATH |
|
data\eth_wrhost
Set the host number selected Ethernet function.
PROTOTYPE
FWLIBAPI short WINAPI eth_wrhost(unsigned short FlibHndl, short type, short host);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||
| type | in |
Kind of communication function is as follows.
|
|||||||||||||||
| host | in |
Set the host number(1,..,3) selected Ethernet function. |
ERRORS
| Code | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
||||||||||||
| EW_PROT |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
data\eth_wrparam
Sets the parameters for Ethernet function : Fast Ethernet board, Fast DATA SERVER board
PROTOTYPE
FWLIBAPI short WINAPI eth_wrparam(unsigned short FlibHndl, short type, IN_ETHPRMFLAG *flag, IN_ETHPRM *param);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type | in |
Kind of parameter is as follows.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| flag | in |
The IN_ETHPRMFLAG structure is as follows.
typedef struct _in_ethprm_flag {
union {
COMMON_PRM_FLG common;
FOCAS2_PRM_FLG focas2;
FTPTRANS_PRM_FLG ftpTrans;
DTSVR_PRM_FLG dataServer;
} flg;
} IN_ETHPRMFLAG;
typedef struct _common_prm_flg {
char OwnIpAddress;
char SubNetmask;
char RouterIpAddress;
char DnsServer1IpAddress;
char DnsServer2IpAddress;
char OwnHostName;
char OwnDomain;
} COMMON_PRM_FLG;
typedef struct _focas2_prm_flg {
char TcpPort;
char UdpPort;
char TimeInterval;
} FOCAS2_PRM_FLG;
typedef struct _ftptrans_prm_flg {
FTP_CLIENT_PRM_FLG opposite[3];
} FTPTRANS_PRM_FLG;
typedef struct _dtsvr_prm_flg {
FTP_CLIENT_PRM_FLG opposite[3];
FTP_SERVER_PRM_FLG own;
} DTSVR_PRM_FLG;
typedef struct _ftp_client_prm_flg {
char HostName;
char ControlPort;
char Dummy;
char UserName;
char Password;
char LoginDirectory;
} FTP_CLIENT_PRM_FLG;
typedef struct _ftp_server_prm_flg {
char UserName;
char Password;
char LoginDirectory;
} FTP_SERVER_PRM_FLG;
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| param | in |
The IN_ETHPRM structure is as follows.
typedef struct _in_ethprm {
short reserve01;
short reserve02;
short reserve03;
short reserve04;
short reserve05;
short reserve06;
union {
COMMON_PRM common;
FOCAS2_PRM focas2;
FTPTRANS_PRM ftpTrans;
DTSVR_PRM2 dataServer;
} prm;
} IN_ETHPRM;
typedef struct _common_prm {
char OwnMacAddress[13];
char OwnIpAddress[40];
char SubNetmask[16];
char RouterIpAddress[40];
char DnsServer1IpAddress[40];
char DnsServer2IpAddress[40];
char OwnHostName[32];
char OwnDomain[63];
} COMMON_PRM; /* Common parameter */
typedef struct _focas2_prm {
unsigned long TcpPort;
unsigned long UdpPort;
unsigned long TimeInterval;
} FOCAS2_PRM; /* Parameter for FOCAS2/Ethernet */
typedef struct _ftptrans_prm {
FTP_CLIENT_PRM opposite[3];
} FTPTRANS_PRM; /* Parameter for FTP transfer */
typedef struct _dtsvr_prm {
FTP_CLIENT_PRM opposite[3];
FTP_SERVER_PRM own;
} DTSVR_PRM; /* Parameter for DATA SERVER */
typedef struct _ftp_client_prm {
char HostName[64];
unsigned long ControlPort;
unsigned long Dummy;
char UserName[32];
char Password[32];
char LoginDirectory[128];
} FTP_CLIENT_PRM;
typedef struct _ftp_server_prm {
char UserName[32];
char Password[32];
char LoginDirectory[128];
} FTP_SERVER_PRM
|
ERRORS
| Code | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_FUNC |
The acquisition of the parameter etc. is failed. In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_PROT |
The writing to the parameter is failed. In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
handle\cnc_allclibhndl
Allocates the library handle which is used by the Data window library.
PROTOTYPE
FWLIBAPI short WINAPI cnc_allclibhndl(unsigned short *FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | out |
Pointer to the variable to which the library handle will be stored. |
ERRORS
| Code | Description |
|---|---|
| EW_HSSB |
Check the power supply of CNC, HSSB I/F board, HSSB connection cable. |
| EW_HANDLE |
|
| EW_BUSY |
Retry this function until the initialization completes. |
handle\cnc_allclibhndl2
Allocates the library handle to the specified node number.
PROTOTYPE
FWLIBAPI short WINAPI cnc_allclibhndl2( long node_no, unsigned short *FlibHndl );
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | out |
Pointer to the variable to which the library handle will be stored. |
| node_no | in |
Specify the node number. (0,..,<maximum node number>) |
ERRORS
| Code | Description |
|---|---|
| EW_NODLL |
|
| EW_HSSB |
Check the power supply of CNC, HSSB I/F board, HSSB connection cable. |
| EW_HANDLE |
|
| EW_MMCSYS |
The device driver for HSSB multi-connection is not installed. |
| EW_BUSY |
Retry this function until the initialization completes. |
| EW_NUMBER |
|
handle\cnc_allclibhndl3
Allocates the library handle and connects to CNC that has the specified IP address or the Host Name.
Before executing this function, set the IP address and the port number of the FOCAS1/Ethernet (TCP) or FOCAS2/Ethernet (TCP) function
on the CNC side correctly.
PROTOTYPE
FWLIBAPI short WINAPI cnc_allclibhndl3(const char *ipaddr, unsigned short port, long timeout, unsigned short *FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| ipaddr | in |
Specify character string of CNC's IP address or Host Name to connect. |
| port | in |
Specify port number of the FOCAS1/Ethernet or FOCAS2/Ethernet (TCP) function. |
| timeout | in |
The best timeout value is different according as system. For example, in case of the hi-speed network system, 10 seconds is sufficient for timeout. But in case of relaying by low-speed telephone line, more than 60 seconds is well for timeout. So you must specify the timeout value after the measurement of your communication time. |
| FlibHndl | out |
Specify pointer to variable including the library handle. |
ERRORS
| Code | Description |
|---|---|
| EW_SOCKET |
Check the power supply of CNC, Ethernet I/F board, Ethernet connection cable. |
| EW_NODLL |
|
| EW_HANDLE |
|
handle\cnc_allclibhndls
Allocates the library handle and connects to CNC that has the specified IP address or the Host Name.
Before executing this function, set the IP address and the port number of the FOCAS1/Ethernet (TCP) or FOCAS2/Ethernet (TCP) function
on the CNC side correctly.
PROTOTYPE
FWLIBAPI short WINAPI cnc_allclibhndls(const char *ipaddr, unsigned short port, char *accesscode, long timeout, unsigned short *FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| ipaddr | in |
Specify character string of CNC's IP address or Host Name to connect. |
| port | in |
Specify port number of the FOCAS1/Ethernet or FOCAS2/Ethernet (TCP) function. |
| accesscode | in |
Access code The "access code" set in CNC are eight figures or less.However, in this function, it specifies it by not the number but the character string. So, specify the character string "123456" or "00123456" for this argument when you set 123456 to the parameter of CNC. The character string is terminated with NULL character (‘\0’). |
| timeout | in |
The best timeout value is different according as system. For example, in case of the hi-speed network system, 10 seconds is sufficient for timeout. But in case of relaying by low-speed telephone line, more than 60 seconds is well for timeout. So you must specify the timeout value after the measurement of your communication time. |
| FlibHndl | out |
Specify pointer to variable including the library handle. |
ERRORS
| Code | Description |
|---|---|
| EW_SOCKET |
Check the power supply of CNC, Ethernet I/F board, Ethernet connection cable. |
| EW_NODLL |
|
| EW_HANDLE |
|
| EW_DATA |
|
| EW_PROT |
|
handle\cnc_freelibhndl
Frees the library handle which was used by the Data window library.
PROTOTYPE
FWLIBAPI short WINAPI cnc_freelibhndl(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
ERRORS
| Code | Description |
|---|
handle\cnc_getlibopt
Reads the current status of FOCAS2 library's optional specifications.
The readable options are as follows.
Value(optname)
Type
Default
Meaning
LIB_MODE(0)
long
0
Gets the advanced mode(0) or the traditional mode(1).
MOVE_RDPRGPTR(1)
long
1
Gets if the execution pointer would be moved(1) or not moved(0) after invoking cnc_rdpdf_line function.
(As for the advanced/traditional mode, see "FS16i compatible mode")
PROTOTYPE
FWLIBAPI short WINAPI cnc_getlibopt( unsigned short FlibHndl, long optname, const char *optval, long *optlen);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| optname | in |
Specify the kind of the option to be stored. |
| optval | out |
Specify the pointer to the buffer to be stored the data. |
| optlen | in/out |
Specify the pointer to the variable which shows the number of bytes to be stored. Set the number of bytes to be read to this variable (*optlen). After reading, the number of bytes actually read is set in this variable(*optlen). |
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size(optlen) is wrong. |
| EW_ATTRIB |
Kind of the option(optname) is wrong. |
handle\cnc_rdnodeinfo
Reads the specified node information of the HSSB.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdnodeinfo( long node_no, ODBNODE *info );
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| node_no | in |
Specify the node number. (0,..,<maximum node number>) |
| info | out |
Pointer to the ODBNODE structure including the node information.
typedef struct odbnode {
long node_no; /* Node number */
long io_base; /* Base address of I/O port */
long status; /* Status of device installation */
long cnc_type; /* Type of CNC */
char node_name[20];/* Node name */
} ODBNODE;
|
ERRORS
| Code | Description |
|---|---|
| EW_MMCSYS |
The device driver for HSSB multi-connection is not installed. |
| EW_NUMBER |
|
handle\cnc_rdnodenum
Reads the number of node of the HSSB.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdnodenum( long *node_num );
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| node_num | out |
Pointer to the variable for the number of node. |
ERRORS
| Code | Description |
|---|---|
| EW_MMCSYS |
The device driver for HSSB multi-connection is not installed. |
handle\cnc_setdefnode
Sets the default node number which is allocated by cnc_allclibhndl function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_setdefnode( long node_no );
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| node_no | in |
Specify the default node number. |
ERRORS
| Code | Description |
|---|---|
| EW_MMCSYS |
The device driver for HSSB multi-connection is not installed. |
| EW_NUMBER |
|
handle\cnc_setlibopt
Changes FOCAS2 library's optional specifications dynamically.
The changeable options are as follows.
Value(optname)
Type
Default
Meaning
LIB_MODE(0)
long
0
Changes the advanced mode(0) or the traditional mode(1).
MOVE_RDPRGPTR(1)
long
1
Changes if the execution pointer would be moved(1) or not moved(0) after invoking cnc_rdpdf_line function.
(As for the advanced/traditional mode, see "FS16i compatible mode")
PROTOTYPE
FWLIBAPI short WINAPI cnc_setlibopt( unsigned short FlibHndl, long optname, const char *optval, long optlen);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| optname | in |
Specify the kind of the option to be set. |
| optval | in |
Specify the pointer to data to be set. |
| optlen | in |
Specify the bytes size of the data(*optval) to be set. |
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size(optlen) is wrong. |
| EW_ATTRIB |
Kind of the option(optname) is wrong. |
| EW_DATA |
Data of the option(*optval) is out of range. |
handle\cnc_settimeout
Changes timeout value, which is specified at allocating the library handle.
PROTOTYPE
FWLIBAPI short WINAPI cnc_settimeout(unsigned short FlibHndl, long timeout);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. |
| timeout | in |
Specify seconds for timeout. If specify 0, timeout process is ignored and the library functions wait infinity. |
ERRORS
| Code | Description |
|---|
history\cnc_clearomhis
Clears the external operator's message history data.
The specification for Series 30i, 0i-D/F and PMi-A are same as cnc_clearophis( Argument "slct=2" ).
PROTOTYPE
FWLIBAPI short WINAPI cnc_clearomhis(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The external message option or the external data input option, and the extended driver/library function are necessary. |
| EW_PARAM |
CNC parameter '3112#2', '3113#0' must be 1.(Series 16/18/21, 16i/18i/21i, 0i-A/B/C) 3195#7=1 (Series 30i, 0i-D/F, PMi-A). |
history\cnc_clearophis
Clears the operation history data and the alarm history data. At Series 30i 0i-D/F and PMi-A, the external operator's message history data are also cleared.
both the operation history and the alarm history are cleared once.
It is possible to select the clearing of the operation history or the alarm history by setting "slct"
The 3 kinds data, that is, the operation history, the alarm history, and the external operator message history can be cleared.
Please use cnc_clearomhis function instead of this for other series.
PROTOTYPE
FWLIBAPI short WINAPI cnc_clearophis(unsigned short FlibHndl, short slct);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| slct | in |
Specify the kind of the cleared history data.
Refer to the following table. In case of 0i-D/F, the history data in the path specified by the cnc_setpath is cleared. O : cleared. - : not cleared.
The cleared history data is different according to setting parameter SAH (No.11354#2) and the SOH (No.11354#3).
|
ERRORS
| Code | Description |
|---|---|
| EW_ATTRIB |
The specification of "kind of the cleared history data" (slct) is wrong. |
| EW_PARAM |
CNC parameter should be as follows. 0015#4=1 (Series 15/15i) 3112#5=0 (Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i) 3195#7=1 (Series 30i, 0i-D/F, PMi-A) 3110#4=1, 3112#5=1 (Series 16i/18i-W) |
| EW_NOOPT |
The extended driver/library function is necessary. |
history\cnc_rdalmhisno
Reads the number of alarm history data. It is necessary to stop sampling the alarm history data by using cnc_stopophis function before this function is used. In case of Series 30i, 0i-D/F and PMi-A the data number of all path is acquired. (In case of other CNC, the data number in the path specified by the cnc_setpath is acquired.)
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdalmhisno(unsigned short FlibHndl, unsigned short *hisno);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| hisno | out |
Pointer to the variable in which the number of alarm history data is stored. |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
| EW_NOOPT |
The extended driver/library function are necessary. |
history\cnc_rdalmhistry
Reads the alarm history data.
The unit of one alarm history data is called a record.
The operation history data and the alarm history data are automatically
recorded on the CNC. When these data are accessed, it is necessary to
temporarily stop sampling on the CNC.
Therefore, it is necessary to execute "Stop logging operation history
data"(cnc_stopophis) before this function is used.
And it is necessary to execute "Restart logging operation history data"
(cnc_startophis) after reading to make the sampling stop time of the
history data as short as possible.
The start/end record number means the relative number uesd at reading
the alarm history data. These record numbers are valid only at the
period from the execution of "Stop logging operation history data"
until the execution of "Restart logging operation history data".
This function cannot be used for Series 15i,
so use cnc_rdalmhistry2 function instead of cnc_rdalmhistry function.
The alarm history data is acquired in old order.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdalmhistry(unsigned short FlibHndl, unsigned short s_no, unsigned short e_no, unsigned short length, ODBAHIS *his);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| s_no | in |
Specify the start record number.(more than 1) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| e_no | in |
Specify the end record number.(more than 1) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| length | in |
Specify the data block length(size of ODBAHIS structure).
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| his | out |
Pointer to the ODBAHIS structure in which the alarm history data is stored. The ODBAHIS structure is as follows.
typedef struct odbahis {
unsigned short s_no; /* Start record number */
short type; /* Not used */
unsigned short e_no; /* Most recently entered */
/* record number */
struct {
short dummy; /* Not used */
short alm_grp; /* Alarm type */
short alm_no; /* Alarm number */
char axis_no; /* Axis number */
char year; /* Year */
char month; /* Month */
char day; /* Day */
char hour; /* Hour */
char minute; /* Minute */
char second; /* Second */
char dummy2; /* Not used */
short len_msg; /* Length of alarm */
/* message */
char alm_msg[32]; /* Alarm message */
} alm_his[N]; /* N : Number of record */
} ODBAHIS ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
| EW_LENGTH |
Size of ODBAHIS structure(length) is wrong. (e_no-s_no+1) * sizeof(data[0]) + 6 > length |
| EW_NUMBER |
The specification of the record number (s_no, e_no) is wrong. |
| EW_NOOPT |
The extended driver/library function is necessary. |
history\cnc_rdalmhistry2
Reads the alarm history data.
Please use this function instead of cnc_rdalmhistry for Series 15i.
The operation history data and the alarm history data are automatically
recorded on the CNC. When these data are accessed, it is necessary to
temporarily stop sampling on the CNC.
Therefore, it is necessary to execute "Stop logging operation history
data"(cnc_stopophis)
before this function is used.
And it is necessary to execute "Restart logging operation history data"
(cnc_startophis) after reading to make the sampling stop time of the
history data as short as possible.
The unit of one alarm history data is called a record.
The start/end record number means the relative number uesd at reading
the alarm history data. These record numbers are valid only at the
period from the execution of "Stop logging operation history data"
until the execution of "Restart logging operation history data".
This function cannot be used for Series 16/18/21, 16i/18i/21i, 0i and Power Mate i,
so use cnc_rdalmhistry function instead of cnc_rdalmhistry function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdalmhistry2(unsigned short FlibHndl, unsigned short s_no, unsigned short e_no, unsigned short length, ODBAHIS2 *his);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| s_no | in |
Specify the start record number.(more than 1) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| e_no | in |
Specify the end record number.(more than 1) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| length | in |
Specify the data block length(size of ODBAHIS2 structure).
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| his | out |
Pointer to the ODBAHIS2 structure in which the alarm history data is stored. The ODBAHIS2 structure is as follows.
typedef struct odbahis2 {
unsigned short s_no; /* Start record number */
unsigned short e_no; /* Most recently entered */
/* record number */
struct {
short alm_grp; /* Alarm type */
short alm_no; /* Alarm number */
short axis_no; /* Axis number */
short year; /* Year */
short month; /* Month */
short day; /* Day */
short hour; /* Hour */
short minute; /* Minute */
short second; /* Second */
short len_msg; /* Length of alarm */
/* messafe */
char alm_msg[32]; /* Alarm message */
} alm_his[N]; /* N : Number of record */
} ODBAHIS2 ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
| EW_LENGTH |
Size of ODBAHIS2 structure(length) is wrong. (e_no-s_no+1) * sizeof(data[0]) + 4 > length |
| EW_NUMBER |
The specification of the record number (s_no, e_no) is wrong. |
| EW_NOOPT |
The extended driver/library function is necessary. |
history\cnc_rdalmhistry3
Reads the alarm history data.
The unit of one alarm history data is called a record.
The operation history data and the alarm history data are automatically
recorded on the CNC. When these data are accessed, it is necessary to
temporarily stop sampling on the CNC.
Therefore, it is necessary to execute "Stop logging operation history
data"(cnc_stopophis)
before this function is used.
And it is necessary to execute "Restart logging operation history data"
(cnc_startophis)
after reading to make the sampling stop time of the
history data as short as possible.
The start/end record number means the relative number uesd at reading
the alarm history data. These record numbers are valid only at the
period from the execution of "Stop logging operation history data"
until the execution of "Restart logging operation history data".
The alarm history data is acquired in old order.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdalmhistry3(unsigned short FlibHndl, unsigned short s_no, unsigned short e_no, unsigned short length, ODBAHIS3 *his);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| s_no | in |
Specify the start record number. (specify 1 or more.) |
| e_no | in |
Specify the end record number. (specify 1 or more.) |
| length | in |
Specify the data block length. (size of ODBAHIS3 structure)
|
| his | out |
Pointer to the ODBAHIS3 structure in which the alarm history data is stored. The ODBAHIS3 structure is as follows.
typedef struct odbahis3 {
unsigned short s_no; /* Start record number */
short type; /* Not used */
unsigned short e_no; /* Most recently entered */
/* record number */
struct {
short dummy; /* Not used */
short alm_grp; /* Alarm type */
short alm_no; /* Alarm number */
char axis_no; /* Axis number */
char year; /* Year */
char month; /* Month */
char day; /* Day */
char hour; /* Hour */
char minute; /* Minute */
char second; /* Second */
char dummy2; /* Not used */
short len_msg; /* Length of alarm */
/* messafe */
char alm_msg[36]; /* Alarm message */
} alm_his[N]; /* N : Number of record */
} ODBAHIS3 ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
cnc_stopophis function has not been executed. |
| EW_LENGTH |
Size of ODBAHIS3 structure(length) is wrong. (e_no-s_no+1) * sizeof(data[0]) + 6 > length |
| EW_NUMBER |
The specification of the record number (s_no, e_no) is wrong. |
| EW_NOOPT |
|
history\cnc_rdalmhistry4
Reads the alarm history data.
Please use this function instead of cnc_rdalmhistry
for Series 30i.
The unit of one alarm history data is called a record.
The operation history data and the alarm history data are automatically
recorded on the CNC. When these data are accessed, it is necessary to
temporarily stop sampling on the CNC.
Therefore, it is necessary to execute "Stop logging operation history
data"(cnc_stopophis)
before this function is used.
And it is necessary to execute "Restart logging operation history data"
(cnc_startophis)
after reading to make the sampling stop time of the
history data as short as possible.
The start/end record number means the relative number uesd at reading
the alarm history data. These record numbers are valid only at the
period from the execution of "Stop logging operation history data"
until the execution of "Restart logging operation history data".
The alarm history data is acquired in old order.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdalmhistry4(unsigned short FlibHndl,
unsigned short s_no, unsigned short e_no, unsigned short length,ODBAHIS4 *his);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| s_no | in |
Specify the start record number. (specify 1 or more.) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| e_no | in |
Specify the end record number. (specify 1 or more.) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| length | in |
Specify the data block length. (size of ODBAHIS4 structure)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| his | out |
Pointer to the ODBAHIS4 structure in which the alarm history data is stored. The ODBAHIS4 structure is as follows.
typedef struct odbahis4 {
unsigned short s_no; /* Start record number */
unsigned short e_no; /* Most recently entered */
struct {
short alm_grp; /* Alarm type */
short alm_no; /* Alarm number */
short axis_no; /* Axis number */
short year; /* Year */
short month; /* Month */
short day; /* Day */
short hour; /* Hour */
short minute; /* Minute */
short second; /* Second */
short len_msg; /* Length of alarm message */
short pth_no; /* path number */
short dummy;
char alm_msg[64]; /* alarm message */
} alm_his[N]; /* N : number of alarm history data to be read */
} ODBAHIS4 ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
| EW_LENGTH |
Size of ODBAHIS4 structure(length) is wrong. (e_no-s_no+1) * sizeof(data[0]) + 4 > length |
| EW_NUMBER |
The specification of the record number (s_no, e_no) is wrong. |
| EW_NOOPT |
The extended driver/library function is necessary. |
history\cnc_rdalmhistry5
Reads the alarm history data.
Please use this function instead of cnc_rdalmhistry for Series 30i, 0i-D/F and PMi-A.
The unit of one alarm history data is called a record.
The operation history data and the alarm history data are automatically
recorded on the CNC. When these data are accessed, it is necessary to
temporarily stop sampling on the CNC.
Therefore, it is necessary to execute "Stop logging operation history
data"(cnc_stopophis)
before this function is used.
And it is necessary to execute "Restart logging operation history data"
(cnc_startophis)
after reading to make the sampling stop time of the
history data as short as possible.
The start/end record number means the relative number uesd at reading
the alarm history data. These record numbers are valid only at the
period from the execution of "Stop logging operation history data"
until the execution of "Restart logging operation history data".
In case of 0i-D, the alarm history data in the path specified by the cnc_setpath is acquired. The alarm history data is acquired in old order.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdalmhistry5(unsigned short FlibHndl,
unsigned short s_no,unsigned short e_no,unsigned short length,ODBAHIS5 *his);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| s_no | in |
Specify the start record number. (specify 1 or more.) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| e_no | in |
Specify the end record number. (specify 1 or more.) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| length | in |
Specify the data block length. (size of ODBAHIS5 structure)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| his | out |
Pointer to the ODBAHIS5 structure in which the alarm history data is stored. The ODBAHIS5 structure is as follows.
typedef struct odbahis5 {
unsigned short s_no; /* Start record number */
unsigned short e_no; /* Most recently entered */
struct {
short alm_grp; /* Alarm type */
short alm_no; /* Alarm number */
short axis_no; /* Axis number or Spindle number */
short year; /* Year */
short month; /* Month */
short day; /* Day */
short hour; /* Hour */
short minute; /* Minute */
short second; /* Second */
short len_msg; /* Length of alarm message */
short pth_no; /* path number */
short dammy;
short dsp_flg; /* Flag for displaying */
short axis_num; /* Total axis number */
char alm_msg[64]; /* Alarm message */
long g_modal[10]; /* Modal data of G code */
char g_dp[10]; /* #7=1 There is a command in the present block. */
/* #6〜#0 place of decimal point */
long a_modal[10]; /* Modal data of B,D,E,F,H,M,N,O,S,T code */
char a_dp[10]; /* #7=1 There is a command in the present block. */
/* #6〜#0 place of decimal point */
long abs_pos[32]; /* Absolute position in alarm occuring */
char abs_dp[32]; /* Place of decimal point for absolute position in alarm occuring */
long mcn_pos[32]; /* Machine position in alarm occuring */
char mcn_dp[32]; /* Place of decimal point for machine position in alarm occuring */
} alm_his[N]; /* N : number of alarm history data to be read */
} ODBAHIS5 ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
| EW_LENGTH |
Size of ODBAHIS4 structure(length) is wrong. (e_no-s_no+1) * sizeof(data[0]) + 4 > length |
| EW_NUMBER |
The specification of the record number (s_no, e_no) is wrong. |
| EW_NOOPT |
The extended driver/library function is necessary. |
history\cnc_rdhissgnl
Reads the target signal for the operation history.
Please use cnc_rdhissgnl2 instead of this function for Series 16i/18i/21i MODEL B with the extended operation history function.
And please use cnc_rdhissgnl3 function for Series 30i.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdhissgnl(unsigned short FlibHndl, IODBSIG *sig);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||
| sig | out |
Pointer to the IODBSIG structure in which the operation history signal is stored. The IODBSIG structure is as follows.
typedef struct iodbsig {
short datano; /* Not used */
short type; /* Not used */
struct {
short ent_no; /* Registration sequence number */
short sig_no; /* Registered signal number */
char sig_name; /* Registered signal name */
char mask_pat; /* Signal mask pattern */
} data[20];
} IODBSIG ;
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
This value is returned when the extended operation history function is exist at Series 16i/18i/21i MODEL B. |
| EW_NOOPT |
The extended driver/library function is necessary. |
history\cnc_rdhissgnl2
Reads the target signal for the operation history.
Please use this function instead of cnc_rdhissgnl for Series 16i/18i/21i MODEL B with the extended operation history function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdhissgnl2(unsigned short FlibHndl, IODBSIG2 *sig);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||
| sig | out |
Pointer to the IODBSIG2 structure in which the operation history signal is stored. The IODBSIG2 structure is as follows.
typedef struct iodbsig2 {
short datano; /* Not used */
short type; /* Number of signals */
struct {
short ent_no; /* Registration sequence number */
short sig_no; /* Registered signal number */
char sig_name; /* Registered signal name */
char mask_pat; /* Signal mask pattern */
} data[45];
} IODBSIG2 ;
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The extended driver/library function is necessary. |
history\cnc_rdhissgnl3
Reads the target signal for the operation history.
Please use this function instead of cnc_rdhissgnl for Series 30i, 0i-D/F and PMi-A.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdhissgnl3(unsigned short FlibHndl, IODBSIG3 *sig);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||
| sig | out |
Pointer to the IODBSIG3 structure in which the operation history signal is stored. The IODBSIG3 structure is as follows.
typedef struct iodbsig3 {
short datano; /* Not used */
short type; /* Not used */
struct {
short ent_no; /* Registration sequence number */
short pmc_no; /* PMC number */
short sig_no; /* Registered signal number */
char sig_name; /* Registered signal name */
char mask_pat; /* Signal mask pattern */
} data[60];
} IODBSIG3 ;
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The extended driver/library function is necessary. |
history\cnc_rdomhisinfo
Reads the maximum number, current number and maximum string length of
external operator's message history data.
It is necessary to stop logging the external operator's message history
data by using cnc_stopomhis function before this function is used.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdomhisinfo(unsigned short FlibHndl, ODBOMIF *hisif);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||
| hisif | out |
Pointer to the ODBOMIF structure for the maximum number, current number and maximum string length of external operator's message history data. The ODBOMIF structure is as follows.
typedef struct odbomif {
unsigned short om_max ; /* maximum number */
unsigned short om_sum ; /* current number */
unsigned short om_char ; /* maximum string length */
/* of external operator's */
/* message history data */
} ODBOMIF ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
| EW_NOOPT |
The external message option or the external data input option, and the extended driver/ library function are necessary. |
| EW_PARAM |
CNC parameter '3112#2' must be 1. |
history\cnc_rdomhisno
Reads the number of the external operator's message history data.
It is necessary to execute "Stop logging operation history data"
(cnc_stopophis) .
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdomhisno(unsigned short FlibHndl, unsigned short *hisno);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| hisno | out |
Pointer to the variable in which the number of the external operator's message history data is stored. |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
| EW_NOOPT |
The external message option or the external data input option, and the extended driver/ library function are necessary. |
| EW_PARAM |
CNC parameter '3112#2' must be 1. |
history\cnc_rdomhistry
Reads the external operator's message history data.
Because the external operator's message history data is recorded
automatically by CNC, it is necessary to stop logging by using
cnc_stopomhis function
before this function is used.
In order to minimize the time when the logging is being suspended,
restart logging by using cnc_startomhis function
as soon as possible after reading history data completes.
The message history data is acquired in new order.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdomhistry(unsigned short FlibHndl, unsigned short s_no, unsigned short *number, ODBOMHIS *his);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| s_no | in |
Specify the start record number.(0, 1, 2,...) |
| number | in/out |
Specify the pointer to the number of history data to be read. Set the number of history data to be read at a time, and this function returns the number of history data which was read actually. |
| his | out |
Pointer to the ODBOMIF structure for the external operator's message history data. The ODBOMIF structure is as follows.
typedef struct odbomhis {
short om_no; /* operator's message number */
short year; /* year */
short month; /* month */
short day; /* day */
short hour; /* hour */
short minute; /* minute */
short second; /* second */
char om_msg[256]; /* operator's message */
} ODBOMHIS ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
| EW_LENGTH |
Number of data(number) is wrong. |
| EW_NUMBER |
Start number(s_no) is wrong. |
| EW_NOOPT |
The external message option or the external data input option, and the extended driver/ library function are necessary. |
| EW_PARAM |
CNC parameter '3112#2' must be 1. |
history\cnc_rdomhistry2
Reads the external operator's message history data.
Please use this function for Series 30i, 0i-D/F and PMi-A.
The unit of one external operator's message history data is called a record.
The operation history data and the alarm history data are automatically recorded on the CNC.
When these data are accessed, it is necessary to temporarily stop sampling on the CNC.
Therefore, it is necessary to execute
"Stop logging operation history data"(cnc_stopophis)
before this function is used.
The start/end record number means the relative number uesd at reading the alarm history data.
These record numbers are valid only at the period from the execution of
"Stop logging operation history data" until the execution of "Restart logging operation history data".
The message history data is acquired in old order.
And it is necessary to execute
"Restart logging operation history data" (cnc_startophis)
after reading to make the sampling stop time of the history data as short as possible.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdomhistry2(unsigned short FlibHndl,
unsigned short s_no,unsigned short e_no, unsigned short length,ODBOMHIS2 *his);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| s_no | in |
Specify the start record number. (specify 1 or more.) |
||||||
| e_no | in |
Specify the end record number. (specify 1 or more.) |
||||||
| length | in |
Specify the data block length. (size of ODBOMHIS2 structure)
|
||||||
| his | out |
Pointer to the ODBOMHIS2 structure in which the alarm history data is stored. The ODBOMHIS2 structure is as follows.
typedef struct odbmhis2 {
unsigned short s_no; /* Start record number */
unsigned short e_no; /* Most recently entered */
/* record number */
struct {
short dsp_flg; /* Flag for displaying */
short om_no; /* operator's message number */
short year; /* year */
short month; /* month */
short day; /* day */
short hour; /* hour */
short minute; /* minute */
short second; /* second */
char ope_msg[256]; /* operator's message */
} opm_his[N]; /* N : number of external operator's
message history data to be read */
} ODBOMHIS2;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
| EW_LENGTH |
Size of ODBOMHIS2 structure(length) is wrong. (e_no-s_no+1) * sizeof(data[0]) + 4 > length |
| EW_NUMBER |
The specification of the record number (s_no, e_no) is wrong. |
| EW_NOOPT |
The external message option or the external data input option, and the extended driver/ library function are necessary. |
| EW_PARAM |
CNC parameter '3112#2' must be 1. |
history\cnc_rdophisno
Reads the number of operation history data. It is necessary to stop sampling the operation history data by using cnc_stopophis function before this function is used.
(Example)
Number
Data
Kind
1
99/11/22
Power-on time
2
12:34:56
3
PS0181
Alarm
4
99/11/22
5
13:00:00
6
[SOFT 1]
MDI key
Number
Data
Kind
1
99/11/22
Power-on time
12:34:56
2
PS0181
Alarm
99/11/22
13:00:00
3
[SOFT 1]
MDI key
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdophisno(unsigned short FlibHndl, unsigned short *hisno);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| hisno | out |
Pointer to the variable in which the number of operation history data is stored. |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
| EW_NOOPT |
The extended driver/library function are necessary. |
history\cnc_rdophistry
Reads the operation history data.
It is necessary to execute cnc_stopophis function before this function is used.
The structure of the operation history data is different according to the kind of the record(rec_type).
When the operation history data is accessed, it is necessary to use a structure corresponding to the kind.
The start/end record number means the relative number uesd at reading
the operation history data. These record numbers are valid only at the
period from the execution of cnc_stopophis function
until the execution of cnc_startophis function.
Please use cnc_rdophistry2 function instead of this function for Series 15i.
Also please use cnc_rdophistry4 function for Series 30i.
And it is necessary to execute cnc_startophis function after reading data as short as possible.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdophistry(unsigned short FlibHndl, unsigned short s_no, unsigned short e_no, unsigned short length, ODBHIS *his);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| s_no | in |
Specify the start record number.(more than 1) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| e_no | in |
Specify the end record number.(more than 1) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| length | in |
Specify the data block length(size of ODBHIS structure).
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| his | out |
Pointer to the ODBHIS structure in which the operation history data is stored. The ODBHIS structure is as follows.
typedef struct odbhis {
unsigned s_no; /* Start record number */
short type; /* Not used */
unsigned e_no; /* Most recently entered */
/* record number */
union {
struct {
short rec_type; /* Record type */
short alm_grp; /* Alarm type */
short alm_no; /* Alarm number */
char axis_no; /* Axis number */
char dummy; /* Not used */
} rec_alm; /* Structure of alarm */
/* record */
struct {
short rec_type; /* Record type */
char key_code; /* Key code */
char pw_flag; /* Power-on flag */
char dummy[4]; /* Not used */
} rec_mdi; /* Structure of */
/* MDI key record */
struct {
short rec_type; /* Record type */
char sig_name; /* Signal name */
char sig_old; /* Bit pattern before a */
/* transition */
char sig_new; /* Bit pattern after a */
/* transition */
char dummy; /* Not used */
short sig_no; /* Signal number */
} rec_sgn; /* Structure of signal */
/* record */
struct {
short rec_type; /* Record type */
char year; /* Year */
char month; /* Month */
char day; /* Day */
char pw_flag; /* Power-on flag */
char dummy[2]; /* Not used */
} rec_date; /* Structure of date */
/* record */
struct {
short rec_type; /* record type */
char hour; /* Hour */
char minute; /* Minute */
char second; /* Second */
char pw_flag; /* Power-on flag */
char dummy[2]; /* Not used */
} rec_time; /* Structure of Time */
/* record */
} data[N]; /* N : Number of record */
} ODBHIS ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
| EW_LENGTH |
Size of ODBHIS structure(length) is wrong. (e_no-s_no+1) * sizeof(data[0]) + 6 < length |
| EW_NUMBER |
The specification of the record number (s_no, e_no) is wrong. |
| EW_NOOPT |
The extended driver/library function is necessary. |
history\cnc_rdophistry2
Reads the operation history data.
It is necessary to execute cnc_stopophis function before this function is used.
The structure of the operation history data is different according to the kind of the record(rec_type).
When the operation history data is accessed, it is necessary to use a structure corresponding to the kind.
The start/end record number means the relative number uesd at reading the operation history data.
Please use this function instead of cnc_rdophistry function for Series 15i.
And it is necessary to execute cnc_startophis function after reading data as short as possible.
These record numbers are valid only at the period from the execution of "Stop logging operation history
data"(cnc_stopophis function) until the execution of
"Restart logging operation history data"(cnc_startophis function).
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdophistry2(unsigned short FlibHndl, unsigned short s_no, unsigned short *e_no, unsigned short *length, void *his);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| s_no | in |
Specify the start record number.(more than 1) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| e_no | in/out |
Specify the pointer to the end record number.(more than 1) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| length | in/out |
Specify the data block length which is enough to store the
specified operation history data.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| his | out |
Pointer to the area to store the operation history data. Each operation history data can be referred by using the ODBOPHIS structure.
typedef struct odbophis {
short rec_len; /* Length */
short rec_type; /* Record type */
union {
struct {
char key_code; /* Key code */
char pw_flag; /* Power-on flag */
short dummy;
} rec_mdi;
struct {
short sig_name; /* Signal name */
short sig_no; /* Signal number */
char sig_old; /* Bit pattern before */
/* transition */
char sig_new; /* Bit pattern after */
/* transition */
short dummy;
} rec_sgn;
struct {
short alm_grp; /* Alarm type */
short alm_no; /* Alarm number */
short axis_no; /* Axis number */
short year; /* Year */
short month; /* Month */
short day; /* Day */
short hour; /* Hour */
short minute; /* Minute */
short second; /* Second */
short dummy;
} rec_alm;
struct {
short evnt_type; /* Event type */
short year; /* Year */
short month; /* Month */
short day; /* Day */
short hour; /* Hour */
short minute; /* Minute */
short second; /* Second */
short dummy;
} rec_:;
} u;
} ODBOPHIS;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
| EW_LENGTH |
Size of area to store the operation history data(length) is wrong. |
| EW_NUMBER |
The specification of the record number (s_no, e_no) is wrong. |
| EW_NOOPT |
The extended driver/library function is necessary. |
history\cnc_rdophistry3
Reads the operation history data.
It is necessary to execute cnc_stopophis function before this function is used.
The structure of the operation history data is different according to the kind of the record(rec_type).
When the operation history data is accessed, it is necessary to use a structure corresponding to the kind.
The start/end record number means the relative number uesd at reading the operation history data.
Please use this function instead of cnc_rdophistry function for Series 30i.
And it is necessary to execute cnc_startophis function after reading data as short as possible.
These record numbers are valid only at the period from the execution of "Stop logging operation history
data"(cnc_stopophis function) until the execution of
"Restart logging operation history data"(cnc_startophis function).
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdophistry3(unsigned short FlibHndl, unsigned short s_no, unsigned short *e_no, unsigned short *length, void *his);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| s_no | in |
Specify the start record number.(more than 1) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| e_no | in/out |
Specify the pointer to the end record number.(more than 1) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| length | in/out |
Specify the data block length which is enough to store the
specified operation history data.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| his | out |
Pointer to the area to store the operation history data. Each operation history data can be referred by using the ODBOPHIS3 structure.
typedef struct odbophis3 {
short rec_len; /* Length */
short rec_type; /* Record type */
union {
struct {
char key_code; /* Key code */
char pw_flag; /* Power-on flag */
short pth_no; /* Path no. */
} rec_mdi; /* MDI */
struct {
short sig_name; /* Signal name */
short sig_no; /* Signal number */
char sig_old; /* Bit pattern before transition */
char sig_new; /* Bit pattern after transition */
short pmc_no; /* PMC number */
} rec_sgn; /* Signal */
struct {
short alm_grp; /* Alarm type */
short alm_no; /* Alarm number */
short axis_no; /* Axis number */
short year; /* Year */
short month; /* Month */
short day; /* Day */
short hour; /* Hour */
short minute; /* Minute */
short second; /* Second */
short pth_no; /* Path number */
} rec_alm; /* Alarm */
struct {
short evnt_type; /* Event type */
short year; /* Year */
short month; /* Month */
short day; /* Day */
short hour; /* Hour */
short minute; /* Minute */
short second; /* Second */
short dummy;
} rec_date; /* Date/Time */
} u;
} ODBOPHIS3 ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
| EW_LENGTH |
Size of area to store the operation history data(length) is wrong. |
| EW_NUMBER |
The specification of the record number (s_no, e_no) is wrong. |
| EW_NOOPT |
The extended driver/library function is necessary. |
history\cnc_rdophistry4
Reads the operation history data. The structure of the operation history data is different according to the kind of the record. The operation history data and the alarm history data are automatically recorded on the CNC.
The start/end record number means the relative number used at reading the operation history data.
Please use this function instead of cnc_rdophistry function for Series 30i, 0i-D/F and PMi-A.
Kind of these data are accessed, it is necessary to temporarily stop sampling on the CNC.
Therefore, it is necessary to execute "Stop logging operation history data"(cnc_stopophis) before this function is used.
These record numbers are valid only at the period from the execution of "Stop logging operation history
data"(cnc_stopophis function) until the execution of
"Restart logging operation history data"(cnc_startophis function).
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdophistry4(unsigned short FlibHndl,unsigned short s_no, unsigned short *e_no, unsigned short *length, void *his);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| s_no | in |
Specify the start record number.(more than 1) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| e_no | in/out |
Specify the pointer to the end record number.(more than 1) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| length | in/out |
Specify the data block length which is enough to store the
specified operation history data.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| his | out |
Using the ODBOPHIS4 structure can refer each operation history data.
typedef struct odbophis4 {
short rec_len; /* Length */
short rec_type; /* Record type */
union {
struct {
char key_code; /* Key code */
char pw_flag; /* Power-on flag */
short pth_no; /* Path number */
short ex_flag; /* External MDI key flag*/
short hour; /* Hour */
short minute; /* Minute */
short second; /* Second */
} rec_mdi; /* MDI */
struct {
short sig_name; /* Signal name */
short sig_no; /* Signal number */
char sig_old; /* Bit pattern before transition */
char sig_new; /* Bit pattern after transition */
short pmc_no; /* PMC number */
short hour; /* Hour */
short minute; /* Minute */
short second; /* Second */
short dummy;
} rec_sgn; /* Signal */
struct {
short alm_grp; /* Alarm type */
short alm_no; /* Relative axis number in the path or Relative spindle number in the path */
short axis_no; /* Axis number */
short year; /* Year */
short month; /* Month */
short day; /* Day */
short hour; /* Hour */
short minute; /* Minute */
short second; /* Second */
short pth_no; /* Path number */
} rec_alm; /* Alarm */
struct {
short evnt_type; /* Event type */
short year; /* Year */
short month; /* Month */
short day; /* Day */
short hour; /* Hour */
short minute; /* Minute */
short second; /* Second */
short dummy;
} rec_date; /* Date/Time */
struct {
short alm_grp; /* Alarm type */
short alm_no; /* Alarm number */
short axis_no; /* Absolute axis number or Absolute spindle number */
short year; /* Year */
short month; /* Month */
short day; /* Day */
short hour; /* Hour */
short minute; /* Minute */
short second; /* Second */
short pth_no; /* Path number */
short sys_alm; /* unused */
short dsp_flg; /* Flag for displaying */
short axis_num; /* Total axis number */
long g_modal[10];/* Modal data of G code */
char g_dp[10]; /* #7=1 There is a command in the present block. */
/* #6〜#0 place of decimal point */
long a_modal[10];/* Modal data of B,D,E,F,H,M,N,O,S,T code */
char a_dp[10]; /* #7=1 There is a command in the present block. */
/* #6〜#0 place of decimal point */
long abs_pos[32];/* Absolute position in alarm occurring */
char abs_dp[32]; /* Absolute position place of decimal point in alarm occurring */
long mcn_pos[32];/* Machine position in alarm occurring */
char mcn_dp[32]; /* Machine position place of decimal point in alarm occurring */
} rec_ial; /* Additional information alarm */
struct {
short alm_grp; /* Alarm type */
short alm_no; /* Alarm number */
short axis_no; /* Absolute axis number or Absolute spindle number */
short year; /* Year */
short month; /* Month */
short day; /* Day */
short hour; /* Hour */
short minute; /* Minute */
short second; /* Second */
short pth_no; /* Path number */
short sys_alm; /* unused */
short dsp_flg; /* Flag for displaying */
short axis_num; /* Total axis number */
char alm_msg[64];/* Alarm message */
long g_modal[10];/* Modal data of G code */
char g_dp[10]; /* #7=1 There is a command in the present block. */
/* #6〜#0 place of decimal point */
long a_modal[10];/* Modal data of B,D,E,F,H,M,N,O,S,T code */
char a_dp[10]; /* #7=1 There is a command in the present block. */
/* #6〜#0 place of decimal point */
long abs_pos[32];/* Absolute position in alarm occurring */
char abs_dp[32]; /* Absolute position place of decimal point in alarm occurring */
long mcn_pos[32];/* Machine position in alarm occurring */
char mcn_dp[32]; /* Machine position place of decimal point in alarm occurring */
} rec_mal; /* Additional information and message alarm */
struct {
short dsp_flg; /* Flag for displaying */
short om_no; /* Message number */
short year; /* Year */
short month; /* Month */
short day; /* Day */
short hour; /* Hour */
short minute; /* Minute */
short second; /* Second */
char ope_msg[256];/* Message */
} rec_opm; /* External operator's message */
struct {
short ofs_grp; /* Tool offset data type */
short ofs_no; /* Tool offset number */
short hour; /* Hour */
short minute; /* Minute */
short second; /* Second */
short pth_no; /* Path number */
long ofs_old; /* Tool offset data before transition */
long ofs_new; /* Tool offset data after transition */
short old_dp; /* Tool offset data place of decimal point before transition */
short new_dp; /* Tool offset data place of decimal point after transition */
} rec_ofs; /* Tool offset transition */
struct {
short prm_grp; /* Parameter data type */
short prm_num; /* Parameter number */
short hour; /* Hour */
short minute; /* Minute */
short second; /* Second */
short prm_len; /* Parameter data length */
long prm_no; /* Parameter number */
long prm_old; /* Parameter data before transition */
long prm_new; /* Parameter data after transition */
short old_dp; /* Parameter data place of decimal point before transition */
short new_dp; /* Parameter data place of decimal point after transition */
} rec_prm; /* Parametertransition */
struct {
short ofs_grp; /* Work offset data type */
short ofs_no; /* Work offset number */
short hour; /* Hour */
short minute; /* Minute */
short second; /* Second */
short pth_no; /* Path number */
short axis_no; /* Axis number */
short dummy;
long ofs_old; /* Work offset data before transition */
long ofs_new; /* Work offset data after transition */
short old_dp; /* Work offset data place of decimal point before transition */
short new_dp; /* Work offset data place of decimal point after transition */
} rec_wof; /* Work offset transition */
struct {
short mac_no; /* Custom macro common variable number */
short hour; /* Hour */
short minute; /* Minute */
short second; /* Second */
short pth_no; /* Path number */
long mac_old; /* Common variable data before transition */
long mac_new; /* Common variable data after transition */
short old_dp; /* Common variable data place of decimal point before transition */
short new_dp; /* Common variable data place of decimal point after transition */
} rec_mac; /* Custom macro common variable transition */
struct {
long mac_no; /* Custom macro common variable number(Extension) */
short hour; /* Hour */
short minute; /* Minute */
short second; /* Second */
short pth_no; /* Path number */
long mac_old; /* Common variable data before transition */
long mac_new; /* Common variable data after transition */
short old_dp; /* Common variable data place of decimal point before transition */
short new_dp; /* Common variable data place of decimal point after transition */
} rec_mac2; /* Custom macro common variable transition */
struct {
short scrn_old; /* Old screen number */
short scrn_new; /* New screen number */
short dummy;
short hour; /* Hour */
short minute; /* Minute */
short second; /* Second */
} rec_scrn; /* Change of screen(number) */
} u;
} ODBOPHIS4 ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
| EW_LENGTH |
Size of area to store the operation history data(length) is wrong. |
| EW_NUMBER |
The specification of the record number (s_no, e_no) is wrong. |
| EW_NOOPT |
The extended driver/library function is necessary. |
history\cnc_startomhis
Restarts logging the external operator's message history data.
The specification for Series 30i, 0i-D/F and PMi-A are same as cnc_startophis.
PROTOTYPE
FWLIBAPI short WINAPI cnc_startomhis(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The external message option or the external data input option, and the extended driver/library function are necessary. |
| EW_FUNC |
|
| EW_PARAM |
CNC parameter '3112#2' must be 1. |
history\cnc_startophis
Restarts sampling the operation history data and the alarm history data of CNC.
In Series 30i, 0i-D/F and PMi-A, the sampling of the external operator's message history data is restarted, too.
(Please use cnc_startomhis function
instead of this for other series.)
PROTOTYPE
FWLIBAPI short WINAPI cnc_startophis(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
| EW_NOOPT |
The extended driver/library function are necessary. |
| EW_PARAM |
Please confirm the CNC parameter.(In Series 16/18/21, 16i/18i/21i, 0i-A/B/C, No.3112#5 to '0'. In Series 16i/18i-W, No.3112#5 to '1'.) |
history\cnc_stopomhis
Stops logging the external operator's message history data.
The specification for Series 30i, 0i-D/F and PMi-A are same as cnc_stopophis.
The sequence of reading the external operator's message history data is as follows.
PROTOTYPE
FWLIBAPI short WINAPI cnc_stopomhis(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
ERRORS
| Code | Description |
|---|---|
| EW_BUSY |
cnc_stopomhis function has been executed. |
| EW_NOOPT |
The external message option or the external data input option, and the extended driver/library function is necessary. |
| EW_PARAM |
CNC parameter '3112#2' must be 1. |
history\cnc_stopophis
Stops sampling the operation history data and the alarm history data of CNC.
The operation history data and the alarm history data are automatically recorded on the CNC.
The sequence of reading the history data is as follows.
In Series 30i/31i/32i, 0i-D/F and PMi-A, the sampling stop of the external operator's message history is also directed.
When these data are accessed, it is necessary to temporarily stop sampling on the CNC by this function.
And it is necessary to execute cnc_startophis function after reading to make the sampling stop time of the history data as short as possible.
1.
Stop sampling. This must be done. (by this function)
2.
Read history data count.(by cnc_rdophisno, cnc_rdalmhisno functions)
3.
Read history data.(by cnc_rdophistry,
cnc_rdophistry2, cnc_rdophistry4, cnc_rdalmhistry, cnc_rdalmhistry2, cnc_rdalmhistry3, cnc_rdalmhistry5 functions)
4.
Restart sampling. This must be done. (by cnc_startophis function)
PROTOTYPE
FWLIBAPI short WINAPI cnc_stopophis(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
ERRORS
| Code | Description |
|---|---|
| EW_BUSY |
cnc_stopophis function has been executed. |
| EW_NOOPT |
The extended driver/library function are necessary. |
| EW_PARAM |
Please confirm the CNC parameter.(In Series 16/18/21, 16i/18i/21i, 0i-A/B/C, No.3112#5 to '0'. In Series 16i/18i-W, No.3112#5 to '1'.) |
| EW_REJECT |
|
history\cnc_wrhissgnl
Writes the target signal for the operation history.
Please use cnc_wrhissgnl2 instead of this function for Series 16i/18i/21i MODEL B with the extended operation history function.
And please use cnc_wrhissgnl3 function for Series 30i.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrhissgnl(unsigned short FlibHndl, IODBSIG *sig);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||
| sig | in |
Pointer to the IODBSIG structure to set the various target signal information for the operation history. The IODBSIG structure is as follows.
typedef struct iodbsig {
short datano; /* Not used */
short type; /* Number of signals */
struct {
short ent_no; /* Registration sequence number */
short sig_no; /* Registered signal number */
char sig_name; /* Registered signal name */
char mask_pat; /* Signal mask pattern */
} data[20];
} IODBSIG ;
|
ERRORS
| Code | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_ATTRIB |
The specification of "Number of signals"(type) is wrong. |
||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
||||||||||||
| EW_NOOPT |
The extended driver/library function is necessary. |
||||||||||||
| EW_PARAM |
|
history\cnc_wrhissgnl2
Writes the target signal for the operation history.
You can find out the extended operation history function exists on the CNC or not, by checking the value of "type" after calling cnc_rdhissgnl2 function.
Please use this function instead of cnc_wrhissgnl for Series 16i/18i/21i MODEL B with the extended operation history function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrhissgnl2(unsigned short FlibHndl, IODBSIG2 *sig);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||
| sig | in |
Pointer to the IODBSIG2 structure to set the various target signal information for the operation history. The IODBSIG2 structure is as follows.
typedef struct iodbsig2 {
short datano; /* Not used */
short type; /* Number of signals */
struct {
short ent_no; /* Registration sequence number */
short sig_no; /* Registered signal number */
char sig_name; /* Registered signal name */
char mask_pat; /* Signal mask pattern */
} data[45];
} IODBSIG2 ;
|
ERRORS
| Code | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_ATTRIB |
The specification of "Number of signals"(type) is wrong. |
||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
||||||||||||
| EW_NOOPT |
The extended driver/library function is necessary. |
||||||||||||
| EW_PARAM |
|
history\cnc_wrhissgnl3
Writes the target signal for the operation history.
Please use this function instead of cnc_wrhissgnl for Series 30i, 0i-D/F and PMi-A.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrhissgnl3(unsigned short FlibHndl, IODBSIG3 *sig);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||
| sig | in |
Pointer to the IODBSIG3 structure to set the various target signal information for the operation history. The IODBSIG3 structure is as follows.
typedef struct iodbsig3 {
short datano; /* Not used */
short type; /* Number of signals */
struct {
short ent_no; /* Registration sequence number */
short pmc_no; /* PMC number */
short sig_no; /* Registered signal number */
char sig_name; /* Registered signal name */
char mask_pat; /* Signal mask pattern */
} data[60];
} IODBSIG3 ;
|
ERRORS
| Code | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_ATTRIB |
The specification of "Number of signals"(type) is wrong. |
|||||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
|||||||||||||||
| EW_NOOPT |
The extended driver/library function is necessary. |
|||||||||||||||
| EW_PARAM |
|
history\cnc_wrkeyhistry
The specified key code is recorded in the operation history in CNC.
Even if this function is executed after the path is switched to path 2
by cnc_setpath, the history of key is recorded in the operation history
in path 1. (Even if this function is executed from either path 1 or
path 2, the history is recorded in the operation history in path 1.)
If you want to use the loader(5th path), the system which corresponds to loader is necessary.
When this function is executed for the system which does not correspond to loader(5th path), the operation is not guaranteed.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrkeyhistry(unsigned short FlibHndl, char key_code);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| key_code | in |
Specify the key code which wants to record in the operation
history. The key code table which is able to record to the
operation history is shown as follows.
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function is not supported by CNC. |
| EW_DATA |
The key_code is wrong. |
| EW_NOOPT |
|
| EW_PARAM |
|
| EW_BUFFER |
The buffer for the history record is full. Wait until the processing for the record ends or retry. |
laser\cnc_rddischarge
Reads data related to electrical discharge at power compensation ends.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rddischarge(unsigned short FlibHndl, ODBDISCHRG *data);
ARGUMENTS
| Name | Direction | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||
| data | out |
Specify the pointer to the array of ODBDISCHRG structure to store the data which related to electrical discharge at the end of power compensation.
typedef struct odbdischrg {
unsigned short aps; /* Power supply select flag */
unsigned short year; /* Year at power compensation ends */
unsigned short month; /* Month at power compensation ends */
unsigned short day; /* Day at power compensation ends */
unsigned short hour; /* Hour at power compensation ends */
unsigned short minute; /* Minute at power compensation ends */
unsigned short second; /* Second at power compensation ends */
short hpc; /* Peak power */
short hfq; /* Pulse frequency */
short hdt; /* Pulse duty */
short hpa; /* Actual power */
long hce; /* Power compensation coefficient */
long rfi[8]; /* RF current(RFI) */
long rfv[8]; /* RF voltage(RFV) */
long dci[8]; /* DC current(DCI) */
long dcv[8]; /* DC voltage(DCV) */
long dcw[8]; /* DC power(DCW) */
} ODBDISCHRG;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 16i/18i-L、30i/31i-LB. |
| EW_NOOPT |
The extended driver/library function are necessary. |
| EW_PARAM |
Mistake of laser oscillator (parameter No.15030) |
laser\cnc_rddischrgalm
Reads alarm history data related to electrical discharge. When you acquire data before and after updating the history data, there might not be continuousness in the acquired data. So, usually acquire all data from the top.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rddischrgalm(unsigned short FlibHndl, long s_no, long *number, ODBDISCHRGALM *data);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||
| s_no | in |
Specify the reading start number of alarm history data related to electrical discharge. (0,1,2,...) |
||||||||||||||||||||||||
| number | in/out |
Specify the pointer to the variable where the number of alarm history data related to electrical discharge which wants to be acquired was setted. |
||||||||||||||||||||||||
| data | out |
Specify the pointer to the array of ODBDISCHRGALM structure to store the alarm history data related to electrical discharge. The number of array must be equal to "number".
typedef struct odbdischrgalm {
unsigned short year; /* Year at alarm occurring */
unsigned short month; /* Month at alarm occurring */
unsigned short day; /* Day at alarm occurring */
unsigned short hour; /* Hour at alarm occurring */
unsigned short minute; /* Minute at alarm occurring */
unsigned short second; /* Second at alarm occurring */
long almnum; /* Alarm number */
unsigned long psec; /* Progress time(second) */
short hpc; /* Peak power */
short hfq; /* Pulse frequency */
short hdt; /* Pulse duty */
short hpa; /* Actual power */
long hce; /* Power compensation coefficient */
unsigned short asq; /* Sequence number at alarm occurring */
unsigned short psu; /* Power supply flag at alarm occurring */
unsigned short aps; /* Power supply select flag */
short dummy; /* uunused */
long rfi[8]; /* RF current(RFI) */
long rfv[8]; /* RF voltage(RFV) */
long dci[8]; /* DC current(DCI) */
long dcv[8]; /* DC voltage(DCV) */
long dcw[8]; /* DC power(DCW) */
short almcd[8]; /* Power supply alarm code */
} ODBDISCHRGALM;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 16i/18i-L, 30i/31i-LB. |
| EW_NUMBER |
Start number(s_no) is wrong. |
| EW_LENGTH |
Number of data(number) is wrong. |
| EW_NOOPT |
The extended driver/library function are necessary. |
| EW_PARAM |
Mistake of laser oscillator (parameter No.15030) |
laser\cnc_rdlactnum
Reads the active cutting number, active piercing number and active slope number.
The data is stored in each member of the ODBLACTN structure.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdlactnum(unsigned short FlibHndl, ODBLACTN *actno);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||
| actno | out |
Pointer to the ODBLACTN structure including the active cutting number, active piercing number and active slope number. The ODBLACTN structure is as follows.
typedef struct odblactn {
short slct; /* Flag of valid data */
short act_proc; /* Active cutting number */
short act_pirce; /* Active piercing number */
short act_slop; /* Active slope number (Series 30i/31i-LB cannot be used.) */
short reserve[5]; /* (reserve) */
} ODBLACTN ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 16i/18i-L、30i/31i-LB. |
| EW_NOOPT |
The cutting condition setting function and the extended driver/library function are necessary. |
| EW_PARAM |
Mistake of laser oscillator (parameter No.15030) |
laser\cnc_rdlagslt
Reads the assist gas selection of laser setting data. The data is stored in each member of the IODBLAGSL structure.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdlagslt(unsigned short FlibHndl, IODBLAGSL *agslt);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||
| agslt | out |
Pointer to the IODBLAGSL structure including the assist gas selection of laser setting data. The IODBLAGSL structure is as follows.
・Series 16i/18i-L
typedef struct iodblagsl {
short slct; /* Flag of valid data */
short ag_slt; /* Assist gas selection */
short agflow_slt; /* Assist gas flow selection */
short reserve[6]; /* (reserve) */
} IODBLAGSL ;
・Series 30i/31i-LB
typedef struct iodblagsl {
short slct; /* Flag of valid data */
short ag_slt; /* Assist gas selection */
short agflow_slt; /* Series 30i/31i-LB cannot be used. */
short ag_press; /* Assist gas pressure */
short ag_ready_t; /* Gas setting time */
short reserve[4]; /* (reserve) */
} IODBLAGSL ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 16i/18i-L, 30i/31i-LB. |
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_PARAM |
Mistake of laser oscillator (parameter No.15030) |
laser\cnc_rdlagst
Reads the assist gas flow of laser setting data. The data is stored in each member of the IODBLAGST structure.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdlagst(unsigned short FlibHndl, IODBLAGST *agst);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||
| agst | out |
Pointer to the IODBLAGST structure including the assist gas flow of laser setting data. The IODBLAGST structure is as follows.
typedef struct iodblagst {
struct {
short slct; /* Flag of valid data */
short pre_time; /* Time for previous step */
short pre_press; /* Pressure in previous step */
short proc_press; /* Machining pressure */
short end_time; /* Time for subsequent step */
short end_press; /* Pressure in subsequent step */
short reserve[3]; /* (reserve) */
} gasflow[3] ;
} IODBLAGST ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 16i/18i-L. |
| EW_NOOPT |
The extended driver/library function is necessary. |
laser\cnc_rdlcmddat
Reads the command data of laser. The data is stored in each member of the ODBLCMDT user define type.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdlcmddat(unsigned short FlibHndl, ODBLCMDT *cmddat);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||
| cmddat | out |
Pointer to the ODBLCMDT structure including the command data of laser. The ODBLCMDT structure is as follows.
・Series 16i/18i-L
typedef struct iodblcmdt {
short slct; /* Flag of valid data */
long feed; /* Actual feedrate */
short power; /* Actual peak power */
short freq; /* Actual pulse frequency */
short duty; /* Actual pulse duty */
short g_kind; /* Command data of assist gas select */
short g_ready_t; /* Assist gas time */
short g_press; /* Actual assist gas pressure */
short error; /* Command data of reference displace */
long dsplc; /* Command data of tool radius offset */
short reserve[7];/* (reserve) */
} ODBLCMDT ;
・Series 30i/31i-LB
typedef struct iodblcmdt {
short slct; /* Flag of valid data */
long feed; /* Actual feedrate */
short power; /* Actual peak power */
short freq; /* Actual pulse frequency */
short duty; /* Actual pulse duty */
short g_kind; /* Command data of assist gas select */
short g_ready_t; /* Assist gas time */
short g_press; /* Actual assist gas pressure */
short error; /* Command data of reference displace */
long dsplc; /* Command data of tool radius offset */
long error2; /* Command data of reference displace 2 */
char gap_axis; /* Gap control axis */
char feed_dec; /* Decimals places */
char dsplc_dec; /* Decimals places */
char error2_dec;/* Decimals places */
short reserve[3]; /* (reserve) */
} ODBLCMDT ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 16i/18i-L, 30i/31i-LB. |
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_PARAM |
Mistake of laser oscillator (parameter No.15030) |
laser\cnc_rdlcmmt
Reads the comment data of laser. The data is stored in 'comment' of the ODBLCMMT structure.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdlcmmt(unsigned short FlibHndl, ODBLCMMT *comment);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| comment | out |
Pointer to the ODBLCMMT structure including the comment data of laser. The ODBLCMMT structure is as follows.
typedef struct odblcmmt {
char comment[25]; /* Comment data */
}ODBLCMMT ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 16i/18i-L, 30i/31i-LB. |
| EW_LENGTH |
The length of a comment exceeds 24 bytes. |
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_PARAM |
Mistake of laser oscillator (parameter No.15030) |
laser\cnc_rdldsplc
Reads the command data of reference displace.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdldsplc(unsigned short FlibHndl, short *dsplc);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| dsplc | out |
Pointer to the variable for the command data of reference displace. |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 16i/18i-L. |
| EW_NOOPT |
The extended driver/library function is necessary. |
laser\cnc_rdldsplc2
Reads the standard displacement.
Each data is stored in the members within IODBDSPLC.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdldsplc2(unsigned short FlibHndl, IODBDSPLC *dsplc);
ARGUMENTS
| Name | Direction | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||
| dsplc | in |
A pointer to the IODBDSPLC structure in which to return the standard displacement. The IODBDSPLC structure is as follows.
typedef struct iodbdsplc {
short slct; /* Flag of valid data */
long dsplc; /* Standard displacement */
short dsplc_dec; /* Decimals places */
char reserve; /* (reserve) */
short reserves[4];/* (reserve) */
} IODBDSPLC ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 30i/31i-LB. |
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_PARAM |
Mistake of laser oscillator (parameter No.15030) |
laser\cnc_rdledgprc
Reads the laser power for contouring. The data is stored in each member of the IODBLEGPR structure.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdledgprc(unsigned short FlibHndl, IODBLEGPR *edgepr);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||
| edgepr | out |
Pointer to the IODBLEGPR structure including the laser power for contouring. The IODBLEGPR structure is as follows.
typedef struct iodblegpr {
short slct; /* Flag of valid data */
short power; /* Peak power */
short freq; /* Pulse frequency */
short duty; /* Pulse duty */
short reserve[5]; /* (reserve) */
} IODBLEGPR ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 16i/18i-L, 30i/31i-LB. |
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_PARAM |
Mistake of laser oscillator (parameter No.15030) |
laser\cnc_rdlerrz
Reads the error of Z-axis tracing.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdlerrz(unsigned short FlibHndl, short *errz);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| errz | out |
Pointer to the variable for the error of Z-axis tracing. |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 16i/18i-L, 30i/31i-LB. |
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_PARAM |
Mistake of laser oscillator (parameter No.15030) |
laser\cnc_rdlppfbdt
Reads the data which the function of actual output estimation type pulse power feedback use.
The data is stored in each member of the IODBLPPFBDT structure.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdlppfbdt(unsigned short FlibHndl, IDBLPPFBFG *rflag, short *number, IODBLPPFBDT *lppfbdt);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||
| rflag | in |
Specifies a pointer to the structure in which to specify the kind and range of data to read. Sets the beginning / finish number which read, when you specify the command value of pulse frequency, the command value of duty cycle, and the actual power.
typedef struct idblppfbfg {
short s_no; /* The group number of data to read. */
short slct; /* The kind of data to read. */
short s_freq; /* The pulse frequency number which begins to read. */
short e_freq; /* The pulse frequency number which finishes to read. */
short s_duty; /* The duty cycle number which begins to read. */
short e_duty; /* The duty cycle number which finishes to read. */
} IDBLPPFBFG ;
|
|||||||||||||||
| number | in/out |
Specifies a pointer to the group number of data of actual output estimation type pulse power feedback to read. Specifies the number to read before calling the function. The number which actually read after calling the function is set. (specify 1 to 8 for the number) |
|||||||||||||||
| lppfbdt | out |
A pointer to the IODBLPPFBDT structure in which to return the group data of actual output estimation type pulse power feedback to read. The data of this structure prepare the number specified by "number". The IODBLPPFBDT structure is as follows.
typedef struct iodblppfbdt {
short ppower; /* The peak power. */
short dummy; /* The dummy variable. */
short freq[10]; /* The pulse frequency */
short duty[10]; /* The duty cycle */
short rpower[10][10]; /* The actual power. */
} IODBLPPFBDT ;
|
ERRORS
| Code | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_FUNC |
This function cannot be used except 30i/31i-LB. |
||||||||||||||||||
| EW_LENGTH |
Number of data(number) is wrong. |
||||||||||||||||||
| EW_NUMBER |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The cutting data group number which an error occurred will be set onto the member of err_no of ODBERR structure and the following detailed status will be set onto the member of err_dtno of ODBERR structure.
|
||||||||||||||||||
| EW_NOOPT |
The extended driver/library function is necessary. |
||||||||||||||||||
| EW_PARAM |
Mistake of laser oscillator (parameter No.15030) The actual output estimation type pulse power feedback function is invalid.(Parameter PFB(No.29000#0) mistake) |
laser\cnc_rdlprcprc
Reads the laser power for piercing. The data is stored in each member of the IODBLPCPR structure.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdlprcprc(unsigned short FlibHndl, IODBLPCPR *pierpr);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||
| pierpr | out |
Pointer to the IODBLPCPR structure including the laser power for piercing. The IODBLPCPR structure is as follows.
typedef struct iodblpcpr {
short slct; /* Flag of valid data */
short power; /* Piercing initial peak power */
short freq; /* Piercing initial pulse frequency */
short duty; /* Piercing initial pulse duty */
long time; /* Piercing time */
short reserve[4]; /* (reserve) */
} IODBLPCPR ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 16i/18i-L, 30i/31i-LB. |
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_PARAM |
Mistake of laser oscillator (parameter No.15030) |
laser\cnc_rdlpscdpwrctl
Reads the item of setting screen at power control.
Each data is stored in the members within IODBPWRCTL.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdlpscdpwrctl(unsigned short FlibHndl,short s_no, short *number, IODBPWRCTL *pwrctl);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||
| s_no | in |
The data group number to read is set.
|
||||||||||||||||||||||||||||
| number | in/out |
A pointer to the number of data items in power control is set. Specifies the number to read before calling the function. The number which actually read after calling the function is set. |
||||||||||||||||||||||||||||
| pwrctl | out |
A pointer to the IODBPWRCTL structure in which to return the data group of power control. The IODBPWRCTL structure is as follows.
typedef struct iodbpwrctl {
short slct; /* Flag of valid data */
short power_min; /* Minimum peak power */
short pwr_sp_zr; /* Peak power at feed rate = 0 */
short freq_min; /* Minimum pulse frequency */
short freq_sp_zr; /* Frequency at feed rate = 0 */
short duty_min; /* Minimum pulse duty */
short duty_sp_zr; /* Pulse duty at feed rate = 0 */
char feed_r_dec; /* Decimals places */
char reserve; /* (reserve) */
long feed_r; /* Allowable width of feed rate fluctuation */
short reserves[7]; /* (reserve) */
} IODBPWRCTL ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 30i/31i-LB. |
| EW_LENGTH |
Number of data(number) is wrong. |
| EW_NUMBER |
Start number(s_no) is wrong. |
| EW_NOOPT |
The cutting condition setting function and the extended driver/library function are necessary. |
| EW_PARAM |
Mistake of laser oscillator (parameter No.15030) |
laser\cnc_rdlpwrcpst
Reads the power compensation coefficient.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdlpwrcpst(unsigned short FlibHndl, short *pwrcpst);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| pwrcpst | out |
Pointer to the variable for the power compensation coefficient. |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 16i/18i-L. |
| EW_NOOPT |
The extended driver/library function is necessary. |
laser\cnc_rdlpwrctrl
Reads the on/off of laser power control.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdlpwrctrl(unsigned short FlibHndl, short *pwrctrl);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| pwrctrl | out |
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 16i/18i-L, 30i/31i-LB. |
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_PARAM |
Mistake of laser oscillator (parameter No.15030) |
laser\cnc_rdlpwrdat
Reads the laser power data. The data is stored in each member of the ODBLOPDT structure.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdlpwrdat(unsigned short FlibHndl, ODBLOPDT *pwrdat);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||
| pwrdat | out |
Pointer to the ODBLOPDT structure including the laser power data. The ODBLOPDT structure is as follows.
・Series 16i/18i-L
typedef struct odblopdt {
short slct; /* Flag of valid data */
short pwr_mon; /* Power monitor value */
short pwr_ofs; /* Power offset */
short pwr_act; /* Actual laser power */
long feed_act; /* Actual feedrate */
short reserve[4]; /* (reserve) */
} ODBLOPDT ;
・Series 30i/31i-LB
typedef struct odblopdt {
short slct; /* Flag of valid data */
short pwr_mon; /* Power monitor value */
short pwr_ofs; /* Power offset */
short pwr_act; /* Actual laser power */
long feed_act; /* Actual feedrate */
char feed_dec; /* Decimals places */
char reserve; /* (reserve) */
short reserves[3];/* (reserve) */
} ODBLOPDT ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 16i/18i-L, 30i/31i-LB. |
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_PARAM |
Mistake of laser oscillator (parameter No.15030) |
laser\cnc_rdlpwrdty
Reads the duty data for power control. The data is stored in each member of the IODBLPWDT structure.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdlpwrdty(unsigned short FlibHndl,IODBLPWDT *pwrdty);
ARGUMENTS
| Name | Direction | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||
| pwrdty | out |
Pointer to the IODBLPWDT structure including the duty data for power control. The IODBLPWDT structure is as follows.
typedef struct iodblpwdt {
short slct; /* Flag of valid data */
short dty_const; /* Constant of duty for power control (Series 30i/31i-LB cannot be used.) */
short dty_min; /* Minimum duty for power control */
short reserve[6];/* (reserve) */
} IODBLPWDT ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 16i/18i-L, 30i/31i-LB. |
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_PARAM |
Mistake of laser oscillator (parameter No.15030) |
laser\cnc_rdlpwrslt
Reads the number of power devices (the number of effective discharge tubes).
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdlpwrslt(unsigned short FlibHndl, short *pwrslt);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| pwrslt | out |
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 16ii/18i-L、30i/31i-LB. |
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_PARAM |
Mistake of laser oscillator (parameter No.15030) |
laser\cnc_rdmngtime
Reads the management time data.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdmngtime(unsigned short FlibHndl, long s_no, long *number, IODBMNGTIME *data);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| s_no | in |
Specify the reading start number of management time data. (0,1,2,...) |
| number | in/out |
Specify the pointer to the variable where the number of management time which wants to be acquired was setted. |
| data | out |
Specify the pointer to the array of IODBMNGTIME structure to store the management time data. The number of array must be equal to "number".
typedef struct iodbmngtime {
unsigned long life; /* Setted life(setting time) */
unsigned long total; /* Total management time(managemant time) */
} IODBMNGTIME;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 16i/18i-L, 30i/31i-LB. |
| EW_NUMBER |
Start number(s_no) is wrong. |
| EW_LENGTH |
Number of data(number) is wrong. |
| EW_NOOPT |
The extended driver/library function are necessary. |
| EW_PARAM |
Mistake of laser oscillator (parameter No.15030) |
laser\cnc_rdpscdedge
Reads the edge cutting data of the cutting condition file. The data is stored in each member of the IODBEDGE structure.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdpscdedge(unsigned short FlibHndl,short s_no, short *number, IODBEDGE *edge);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||
| s_no | in |
Specify the start edge cutting data group number.
|
|||||||||||||||||||||||||||||||||||||||
| number | in/out |
Pointer to the number of edge cutting data. Specify the number of edge cutting data to be read before function call, and the number of edge cutting data being read actually is stored after the function call. |
|||||||||||||||||||||||||||||||||||||||
| edge | out |
Pointer to the IODBEDGE structure including the edge cutting data of the cutting condition file. The IODBEDGE structure is as follows.
typedef struct iodbedge {
short slct; /* Flag of valid data */
short angle; /* Judge angle for edge */
short power; /* Piercing power */
short freq; /* Piercing frequency */
short duty; /* Piercing duty */
long pier_t; /* Piercing time */
short g_press; /* Piercing gas press */
short g_kind; /* Piercing gas select */
long r_len; /* Recovery distance */
short r_feed; /* Recovery feedrate */
short r_freq; /* Recovery frequency */
short r_duty; /* Recovery duty */
short gap; /* Deflection/gap */
short reserve[4]; /* (reserve) */
} IODBEDGE ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 16i/18i-L. |
| EW_LENGTH |
Number of data(number) is wrong. |
| EW_NUMBER |
Start number(s_no) is wrong. |
| EW_NOOPT |
The cutting condition setting function, the edge cutting function and the extended driver/library function are necessary. |
laser\cnc_rdpscdedge2
Reads the edge cutting data in the cutting conditions file.
Each data is stored in the members within IODBEDGE2.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdpscdedge2(unsigned short FlibHndl,short s_no, short *number, IODBEDGE2 *edge2);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| s_no | in |
The data group number to read is set. When addition of the cutting condition data option is not provided.
When addition of the cutting condition data option is provided.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| number | in/out |
A pointer to the number of data items in edge cutting is set. Specifies the number to read before calling the function. The number which actually read after calling the function is set. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| edge2 | out |
A pointer to the IODBEDGE2 structure in which to return the data group of edge cutting. The IODBEDGE2 structure is as follows.
typedef struct iodbedge2 {
short slct; /* Flag of valid data */
short power; /* Peak power in piercing */
short freq; /* Frequency in piercing */
short duty; /* Duty in piercing */
short g_press; /* Assist gas pressure in piercing */
short g_kind; /* Assist gas type in piercing */
long pier_t; /* Time in piercing */
long angle; /* Edge operation angle */
long gap; /* Standard displacement */
long r_len; /* Return distance */
long r_feed; /* Return speed */
short r_freq; /* Return frequency */
short r_duty; /* Return pulse duty */
char gap_axis; /* Gap control axis */
char angle_dec; /* Ddecimals places */
char gap_dec; /* Ddecimals places */
char r_len_dec; /* Ddecimals places */
char r_feed_dec; /* Ddecimals places */
char reserve; /* (reserve) */
short reserves[3]; /* (reserve) */
} IODBEDGE2 ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 30i/31i-LB. |
| EW_LENGTH |
Number of data(number) is wrong. |
| EW_NUMBER |
Start number(s_no) is wrong. |
| EW_NOOPT |
The cutting condition setting function, the edge cutting function and the extended driver/library function are necessary. |
| EW_PARAM |
Mistake of laser oscillator (parameter No.15030) |
laser\cnc_rdpscdpirc
Reads the piercing data of the cutting condition file. The data is stored in each member of the IODBPIRC structure.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdpscdpirc(unsigned short FlibHndl,short s_no, short *number, IODBPIRC *pircing);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| s_no | in |
Specify the start piercing data group number. ・Series 16i/18i-L
・Series 30i/31i-LB When addition of the cutting condition data option is not provided.
When addition of the cutting condition data option is provided.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| number | in/out |
Pointer to the number of piercing data. Specify the number of piercing data to be read before function call, and the number of piercing data being read actually is stored after the function call. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pircing | out |
Pointer to the IODBPIRC structure including the piercing data of the cutting condition file. The IODBPIRC structure is as follows.
・Series 16i/18i-L
typedef struct iodbpirc {
short slct; /* Flag of valid data */
short power; /* Peak power */
short freq; /* Initial frequency */
short duty; /* Initial duty */
short i_freq; /* Step frequency */
short i_duty; /* Step duty */
short step_t; /* Step time */
short step_sum; /* Step number */
long pier_t; /* Piercing time */
short g_press; /* Assist gas pressure */
short g_kind; /* Assist gas select */
short g_time; /* Assist gas setting time */
short def_pos; /* Reference displace */
short reserve[4]; /* (reserve) */
} IODBPIRC ;
・Series 30i/31i-LB
typedef struct iodbpirc {
short slct; /* Flag of valid data */
short power; /* Peak power */
short freq; /* Initial frequency */
short duty; /* Initial duty */
short i_freq; /* Step frequency */
short i_duty; /* Step duty */
short step_t; /* Step time */
short step_sum; /* Step number */
long pier_t; /* Piercing time */
short g_press; /* Assist gas pressure */
short g_kind; /* Assist gas select */
short g_time; /* Assist gas setting time */
short def_pos; /* Reference displace */
long def_pos2; /* Reference displace 2 */
char gap_axis; /* Gap control axis */
char def_pos2_dec;/* Decimals places */
short reserve; /* (reserve) */
} IODBPIRC ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 16i/18i-L, 30i/31i-LB. |
| EW_LENGTH |
Number of data(number) is wrong. |
| EW_NUMBER |
Start number(s_no) is wrong. |
| EW_NOOPT |
The cutting condition setting function and the extended driver/library function are necessary. |
| EW_PARAM |
Mistake of laser oscillator (parameter No.15030) |
laser\cnc_rdpscdproc
Reads the cutting data of the cutting condition file. The data is stored in each member of the IODBPSCD structure.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdpscdproc(unsigned short FlibHndl,short s_no, short *number, IODBPSCD *pscd);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| s_no | in |
Specify the start cutting data group number. ・Series 16i/18i-L
・Series 30i/31i-LB When addition of the cutting condition data option is not provided.
When addition of the cutting condition data option is provided.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| number | in/out |
Pointer to the number of cutting data. Specify the number of cutting data to be read before functioncall, and the number of cutting data being read actually is stored after the function call. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pscd | out |
Pointer to the IODBPSCD structure including the cutting data of the cutting condition file. The IODBPSCD structure is as follows.
・Series 16i/18i-L
typedef struct iodbpscd {
short slct; /* Flag of valid data */
long feed; /* Feedrate */
short power; /* Cutting peak power */
short freq; /* Cutting frequency */
short duty; /* Cutting duty */
short g_press; /* Assist gas pressure */
short g_kind; /* Assist gas select */
short g_ready_t; /* Gas setting time */
short displace; /* Reference displace */
long supple; /* Beam radius offset */
short edge_slt; /* Edge cutting select */
short appr_slt; /* Start-up select */
short pwr_ctrl; /* Power control */
short reserve[4]; /* (reserve) */
} IODBPSCD ;
・Series 30i/31i-LB
typedef struct iodbpscd {
short slct; /* Flag of valid data */
long feed; /* Feedrate */
short power; /* Cutting peak power */
short freq; /* Cutting frequency */
short duty; /* Cutting duty */
short g_press; /* Assist gas pressure */
short g_kind; /* Assist gas select */
short g_ready_t; /* Gas setting time */
short displace; /* Reference displace */
long supple; /* Beam radius offset */
short edge_slt; /* Edge cutting select */
short appr_slt; /* Start-up select */
short pwr_ctrl; /* Power control */
long displace2; /* Reference displace */
char gap_axis; /* Gap control axis */
char feed_dec; /* Decimals places */
char supple_dec; /* Decimals places */
char dsp2_dec; /* Decimals places */
} IODBPSCD ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 16i/18i-L , 30i/31i-LB. |
| EW_LENGTH |
Number of data(number) is wrong. |
| EW_NUMBER |
Start number(s_no) is wrong. |
| EW_NOOPT |
The cutting condition setting function and the extended driver/library function are necessary. |
| EW_PARAM |
Mistake of laser oscillator (parameter No.15030) |
laser\cnc_rdpscdslop
Reads the slope control data of the cutting condition file. The data is stored in each member of the IODBSLOP structure.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdpscdslop(unsigned short FlibHndl,short s_no, short *number, IODBSLOP *slope);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| s_no | in |
Specify the start slope control data group number.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| number | in/out |
Pointer to the number of slope control data. Specify the number of slope control data to be read before function call, and the number of slope control data being read actually is stored after the function call. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| slope | out |
Pointer to the IODBSLOP structure including the slope control data of the cutting condition file. The IODBSLOP structure is as follows.
typedef struct iodbslop {
long slct; /* Flag of valid data */
long upleng; /* Step(UP) distance */
short upsp[10]; /* Step(UP) power 1 to 10 */
long dwleng; /* Step(DOWN) distance */
short dwsp[10]; /* Step(DOWN) power 1 to 10 */
short reserve[10];/* (reserve) */
} IODBSLOP ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 16i/18i-L. |
| EW_LENGTH |
Number of data(number) is wrong. |
| EW_NUMBER |
Start number(s_no) is wrong. |
| EW_NOOPT |
The cutting condition setting function, the slope control function and the extended driver/library function are necessary. |
laser\cnc_rdpwofsthis
Reads the history data of the power compensation coefficient. When you acquire data before and after updating the history data, there might not be continuousness in the acquired data. So, usually acquire all data from the top.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdpwofsthis(unsigned short FlibHndl, long s_no, long *number, ODBPWOFST *data);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| s_no | in |
Specify the reading start number of power compensation coefficient. (0,1,2,...) |
| number | in/out |
Specify the pointer to the variable where the number of history data of power compensation coefficient which wants to be acquired was setted. |
| data | out |
Specify the pointer to the array of ODBPWOFST structure to store the history data of the power compensation coefficient. The number of array must be equal to "number".
typedef struct odbpwofst {
long pwratio; /* Power compensation coefficient */
long rfvolt; /* RF voltage */
unsigned short year; /* year */
unsigned short month; /* month */
unsigned short day; /* day */
unsigned short hour; /* hour */
unsigned short minute; /* minute */
unsigned short second; /* second */
} ODBPWOFST;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 16i/18i-L, 30i/31i-LB. |
| EW_NUMBER |
Start number(s_no) is wrong. |
| EW_LENGTH |
Number of data(number) is wrong. |
| EW_NOOPT |
The extended driver/library function are necessary. |
| EW_PARAM |
Mistake of laser oscillator (parameter No.15030) |
laser\cnc_wrlagslt
Writes the assist gas selection of laser setting data.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrlagslt(unsigned short FlibHndl, IODBLAGSL *agslt);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||
| agslt | in |
Pointer to the IODBLAGSL structure including the assist gas selection of laser setting data. The IODBLAGSL structure is as follows.
・Series 16i/18i-L
typedef struct iodblagsl {
short slct; /* Flag of data selection */
short ag_slt; /* Assist gas selection */
short agflow_slt; /* Assist gas flow selection */
short reserve[6]; /* (reserve) */
} IODBLAGSL ;
・Series 30i/31i-LB
typedef struct iodblagsl {
short slct; /* FFlag of data selection */
short ag_slt; /* Assist gas selection */
short agflow_slt; /* Series 30i/31i-LB cannot be used. */
short ag_press; /* Assist gas pressure */
short ag_ready_t; /* Gas setting time */
short reserve[4]; /* (reserve) */
} IODBLAGSL ;
|
ERRORS
| Code | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_FUNC |
This function cannot be used except 16i/18i-L, 30i/31i-LB. |
||||||||||||||||||
| EW_DATA |
The assist gas selection of laser setting data is wrong. In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure. ・Series 16i/18i-L
・Series 30i/31i-LB
|
||||||||||||||||||
| EW_NOOPT |
The extended driver/library function is necessary. |
||||||||||||||||||
| EW_PARAM |
Mistake of laser oscillator (parameter No.15030) |
laser\cnc_wrlagst
Writes the assist gas flow of laser setting data.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrlagst(unsigned short FlibHndl, IODBLAGST *agst);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||
| agst | in |
Pointer to the IODBLAGST structure including the assist gas flow of laser setting data. The IODBLAGST structure is as follows.
typedef struct iodblagst {
struct {
short slct; /* Flag of data selection */
short pre_time; /* Time for previous step */
short pre_press; /* Pressure in previous step */
short proc_press; /* Machining pressure */
short end_time; /* Time for subsequent step */
short end_press; /* Pressure in subsequent step */
short reserve[3]; /* (reserve) */
} gasflow[3] ;
} IODBLAGST ;
|
ERRORS
| Code | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_FUNC |
This function cannot be used except 16i/18i-L. |
|||||||||||||||
| EW_DATA |
The assist gas flow of laser setting data is wrong. In order to get more information for this err_no return value, execute cnc_getdtailerr function.
|
|||||||||||||||
| EW_NOOPT |
The extended driver/library function is necessary. |
laser\cnc_wrldsplc
Writes the command data of reference displace.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrldsplc(unsigned short FlibHndl, short dsplc);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| dsplc | in |
Specify the command data of reference displace. |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 16i/18i-L. |
| EW_DATA |
The command data of reference displace(dsplc) is wrong. |
| EW_NOOPT |
The extended driver/library function is necessary. |
laser\cnc_wrldsplc2
Writes the standard displacement.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrldsplc2(unsigned short FlibHndl, IODBDSPLC *dsplc);
ARGUMENTS
| Name | Direction | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||
| dsplc | in |
A pointer to the iodbdsplc structure in which to specify the standard displacement. The IODBDSPLC structure is as follows.
typedef struct iodbdsplc {
short slct; /* Flag of data selection */
long dsplc; /* Standard displacement */
short dsplc_dec; /* Decimals places */
char reserve; /* (reserve) */
short reserves[4];/* (reserve) */
} IODBDSPLC ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 30i/31i-LB. |
| EW_DATA |
Error of standard displacement. |
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_PARAM |
Mistake of laser oscillator (parameter No.15030) |
laser\cnc_wrledgprc
Writes the laser power for contouring.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrledgprc(unsigned short FlibHndl, IODBLEGPR *edgepr);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||
| edgepr | in |
Pointer to the IODBLEGPR structure including the laser power for contouring. The IODBLEGPR structure is as follows.
typedef struct iodblegpr {
short slct; /* Flag of data selection */
short power; /* Peak power */
short freq; /* Pulse frequency */
short duty; /* Pulse duty */
short reserve[5]; /* (reserve) */
} IODBLEGPR ;
|
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_FUNC |
This function cannot be used except 16i/18i-L, 30i/31i-LB. |
|||||||||
| EW_DATA |
The laser power for contouring is wrong. In order to get more information for this err_no return value, execute cnc_getdtailerrfunction. The following details status will be set onto the member, err_no of ODBERR structure.
|
|||||||||
| EW_NOOPT |
The extended driver/library function is necessary. |
|||||||||
| EW_PARAM |
Mistake of laser oscillator (parameter No.15030) |
laser\cnc_wrlppfbdt
Writes the data which the function of actual output estimation type pulse power feedback use.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrlppfbdt(unsigned short FlibHndl, IDBLPPFBFG *wflag, short *number, IODBLPPFBDT *lppfbdt);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||
| wflag | in |
Specifies a pointer to the structure in which to specify the kind and range of data to write. Sets the beginning / finish number which write, when you specify the command value of pulse frequency, the command value of duty cycle, and the actual power.
typedef struct idblppfbfg {
short s_no; /* The group number of data to write. */
short slct; /* The kind of data to write. */
short s_freq; /* The pulse frequency number which begins to write. */
short e_freq; /* The pulse frequency number which finishes to write.*/
short s_duty; /* The duty cycle number which begins to write. */
short e_duty; /* The duty cycle number which finishes to write. */
} IDBLPPFBFG ;
|
|||||||||||||||
| number | in/out |
Specifies a pointer to the group number of data of actual output estimation type pulse power feedback to write. Specifies the number to write before calling the function. The number which actually wrote after calling the function is set. (specify 1 to 8 for the number) |
|||||||||||||||
| lppfbdt | in |
A pointer to the IODBLPPFBDT structure in which to specify group data of actual output estimation type pulse power feedback to write. The data of this structure prepare the number specified by "number". The IODBLPPFBDT structure is as follows.
typedef struct iodblppfbdt {
short ppower; /* The peak power. */
short dummy; /* The dummy variable. */
short freq[10]; /* The pulse frequency */
short duty[10]; /* The duty cycle */
short rpower[10][10]; /* The actual power. */
} IODBLPPFBDT ;
|
ERRORS
| Code | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_FUNC |
This function cannot be used except 30i/31i-LB. |
||||||||||||||||||
| EW_LENGTH |
Number of data(number) is wrong. |
||||||||||||||||||
| EW_NUMBER |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The cutting data group number which an error occurred will be set onto the member of err_no of ODBERR structure and the following detailed status will be set onto the member of err_dtno of ODBERR structure.
|
||||||||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The cutting data group number which an error occurred will be set onto the member of err_no of ODBERR structure and the following detailed status will be set onto the member of err_dtno of ODBERR structure.
|
||||||||||||||||||
| EW_NOOPT |
The extended driver/library function is necessary. |
||||||||||||||||||
| EW_PARAM |
Mistake of laser oscillator (parameter No.15030) The actual output estimation type pulse power feedback function is invalid.(Parameter PFB(No.29000#0) mistake) |
laser\cnc_wrlprcprc
Writes the laser power for piercing.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrlprcprc(unsigned short FlibHndl, IODBLPCPR *pierpr);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||
| pierpr | in |
Pointer to the IODBLPCPR structure including the laser power for piercing. The IODBLPCPR structure is as follows.
typedef struct iodblpcpr {
short slct; /* Flag of data selection */
short power; /* Piercing initial peak power */
short freq; /* Piercing initial pulse frequency */
short duty; /* Piercing initial pulse duty */
long tsime; /* Piercing time */
short reserve[4]; /* (reserve) */
} IODBLPCPR ;
|
ERRORS
| Code | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_FUNC |
This function cannot be used except 16i/18i-L, 30i/31i-LB. |
||||||||||||
| EW_DATA |
The laser power for piercing is wrong. In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
|
||||||||||||
| EW_NOOPT |
The extended driver/library function is necessary. |
||||||||||||
| EW_PARAM |
Mistake of laser oscillator (parameter No.15030) |
laser\cnc_wrlpscdpwrctl
Writes the Power control data .
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrlpscdpwrctl(unsigned short FlibHndl,short s_no, short *number, IODBPWRCTL *pwrctl);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||
| s_no | in |
Specifies the data group number to write.
|
||||||||||||||||||||||||||||
| number | in/out |
Specifies a pointer to the number of data items in power control. Specifies the number to write before calling the function. The number which actually wrote after calling the function is set. |
||||||||||||||||||||||||||||
| pwrctl | in |
A pointer to the IODBPWRCTL structure in which to specify the cutting conditions file (the power control data) to write. The IODBPWRCTL structure is as follows.
typedef struct iodbpwrctl {
short slct; /* Flag of data selection */
short power_min; /* Minimum peak power */
short pwr_sp_zr; /* Peak power at feed rate = 0 */
short freq_min; /* Minimum pulse frequency */
short freq_sp_zr; /* Frequency at feed rate = 0 */
short duty_min; /* Minimum pulse duty */
short duty_sp_zr; /* Pulse duty at feed rate = 0 */
char feed_r_dec; /* Decimals places */
char reserve; /* (reserve) */
long feed_r; /* Allowable width of feed rate fluctuation */
short reserves[7]; /* (reserve) */
} IODBPWRCTL ;
|
ERRORS
| Code | Description | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_FUNC |
This function cannot be used except 30i/31i-LB. |
|||||||||||||||||||||
| EW_LENGTH |
Number of data(number) is wrong. |
|||||||||||||||||||||
| EW_NUMBER |
Start number(s_no) is wrong. |
|||||||||||||||||||||
| EW_DATA |
The power control data of the cutting condition file is wrong. In order to get more information for this err_no return value, execute cnc_getdtailerr function. The cutting data group number which an error occurred will be set onto the member of err_no of ODBERR structure and the following detailed status will be set onto the member of err_dtno of ODBERR structure.
|
|||||||||||||||||||||
| EW_NOOPT |
The cutting condition setting function and the extended driver/library function are necessary. |
|||||||||||||||||||||
| EW_PARAM |
Mistake of laser oscillator (parameter No.15030) |
laser\cnc_wrlpwrcpst
Writes the power compensation coefficient.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrlpwrcpst(unsigned short FlibHndl, short pwrcpst);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| pwrcpst | in |
Specify the power compensation coefficient. |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 16i/18i-L. |
| EW_DATA |
The power compensation coefficient(pwrcpst) is wrong. |
| EW_NOOPT |
The extended driver/library function is necessary. |
laser\cnc_wrlpwrctrl
Writes the on/off of laser power control.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrlpwrctrl(unsigned short FlibHndl, short pwrctrl);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| pwrctrl | in |
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 16i/18i-L, 30i/31i-LB. |
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_PARAM |
Mistake of laser oscillator (parameter No.15030) |
laser\cnc_wrlpwrdty
Writes the duty data for power control.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrlpwrdty(unsigned short FlibHndl,IODBLPWDT *pwrdty);
ARGUMENTS
| Name | Direction | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||
| pwrdty | in |
Pointer to the IODBLPWDT structure including the duty data for power control. The IODBLPWDT structure is as follows.
typedef struct iodblpwdt {
short slct; /* Flag of data selection */
short dty_const; /* Constant of duty for power control (Series 30i/31i-LB cannot be used.) */
short dty_min; /* Minimum duty for power control */
short reserve[6];/* (reserve) */
} IODBLPWDT ;
|
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_FUNC |
This function cannot be used except 16i/18i-L, 30i/31i-LB. |
||||||
| EW_DATA |
The duty data for power control is wrong. In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
|
||||||
| EW_NOOPT |
The extended driver/library function is necessary. |
||||||
| EW_PARAM |
Mistake of laser oscillator (parameter No.15030) |
laser\cnc_wrlpwrslt
Writes the number of power devices (the number of effective discharge tubes).
Either all tubes or half can be specified.
After changing the setting, turn off the HV, and turn on it.
Then the number of effective discharge tubes is changed.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrlpwrslt(unsigned short FlibHndl, short pwrslt);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| pwrslt | in |
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 16i/18i-L, 30i/31i-LB. |
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_PARAM |
Mistake of laser oscillator (parameter No.15030) |
laser\cnc_wrmngtime
Writes the management time data.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrmngtime(unsigned short FlibHndl, long no, IODBMNGTIME *data);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| no | in |
Specify the setting number of management time data. (0,1,2,...) |
| data | in |
Specify the pointer to IODBMNGTIME structure which stored the management time data.
typedef struct iodbmngtime {
unsigned long life; /* Setted life(setting time) */
unsigned long total; /* Total management time(managemant time) */
} IODBMNGTIME;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 16i/18i-L, 30i/31i-LB. |
| EW_NUMBER |
Start number(s_no) is wrong. |
| EW_NOOPT |
The extended driver/library function are necessary. |
| EW_PARAM |
Set "1" in the parameter No.15160#1. Mistake of laser oscillator (parameter No.15030)(Series 30i/31i-LB only) |
laser\cnc_wrpscdedge
Writes the edge cutting data of the cutting condition file.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrpscdedge(unsigned short FlibHndl,short s_no, short *number, IODBEDGE *edge);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||
| s_no | in |
Specify the start edge cutting data group number.
|
|||||||||||||||||||||||||||||||||||||||
| number | in/out |
Pointer to the number of edge cutting data. Specify the number of edge cutting data to be written before function call, and the number of edge cutting data being written actually is stored after the function call. |
|||||||||||||||||||||||||||||||||||||||
| edge | in |
Pointer to the IODBEDGE structure including the edge cutting data of the cutting condition file. The IODBEDGE structure is as follows.
typedef struct iodbedge {
short slct; /* Flag of data selection */
short angle; /* Judge angle for edge */
short power; /* Piercing power */
short freq; /* Piercing frequency */
short duty; /* Piercing duty */
long pier_t; /* Piercing time */
short g_press; /* Piercing gas press */
short g_kind; /* Piercing gas select */
long r_len; /* Recovery distance */
short r_feed; /* Recovery feedrate */
short r_freq; /* Recovery frequency */
short r_duty; /* Recovery duty */
short gap; /* Deflection/gap */
short reserve[4]; /* (reserve) */
} IODBEDGE ;
|
ERRORS
| Code | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_FUNC |
This function cannot be used except 16i/18i-L. |
||||||||||||||||||||||||||||||||||||
| EW_LENGTH |
Number of data(number) is wrong. |
||||||||||||||||||||||||||||||||||||
| EW_NUMBER |
Start number(s_no) is wrong. |
||||||||||||||||||||||||||||||||||||
| EW_DATA |
The edge cutting data of the cutting condition file is wrong. In order to get more information for this err_no return value, execute cnc_getdtailerr function. The edge cutting data group number which an error occurred will be set onto the member of err_no of ODBERR structure, and the following detailed status will be set onto the member of err_dtno of ODBERR structure.
|
||||||||||||||||||||||||||||||||||||
| EW_NOOPT |
The cutting condition setting function, the edge cutting function and the extended driver/library function are necessary. |
laser\cnc_wrpscdedge2
Writes the edge cutting data in the cutting conditions file.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrpscdedge2(unsigned short FlibHndl,short s_no, short *number, IODBEDGE2 *edge2);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||
| s_no | in |
Specifies the data group number to write. When addition of the cutting condition data option is not provided.
When addition of the cutting condition data option is provided.
|
|||||||||||||||||||||||||||||||||||||||||||||||||
| number | in/out |
A pointer to the number of data items in edge cutting is set. Specifies the number to write before calling the function. The number which actually wrote after calling the function is set. |
|||||||||||||||||||||||||||||||||||||||||||||||||
| edge2 | in |
A pointer to the iodbedge2 structure in which to specify the cutting conditions file (the edge cutting data) to write. The IODBEDGE2 structure is as follows.
typedef struct iodbedge2 {
short slct; /* Flag of data selection */
short power; /* Peak power in piercing */
short freq; /* Frequency in piercing */
short duty; /* Duty in piercing */
short g_press; /* Assist gas pressure in piercing */
short g_kind; /* Assist gas type in piercing */
long pier_t; /* Time in piercing */
long angle; /* Edge operation angle */
long gap; /* Standard displacement */
long r_len; /* Return distance */
long r_feed; /* Return speed */
short r_freq; /* Return frequency */
short r_duty; /* Return pulse duty */
char gap_axis; /* Gap control axis */
char angle_dec; /* Ddecimals places */
char gap_dec; /* Ddecimals places */
char r_len_dec; /* Ddecimals places */
char r_feed_dec; /* Ddecimals places */
char reserve; /* (reserve) */
short reserves[3]; /* (reserve) */
} IODBEDGE2 ;
|
ERRORS
| Code | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_FUNC |
This function cannot be used except 30i/31i-LB. |
||||||||||||||||||||||||||||||||||||
| EW_LENGTH |
Number of data(number) is wrong. |
||||||||||||||||||||||||||||||||||||
| EW_NUMBER |
Start number(s_no) is wrong. |
||||||||||||||||||||||||||||||||||||
| EW_DATA |
The edge cutting data of the cutting condition file is wrong. In order to get more information for this err_no return value, execute cnc_getdtailerr function. The cutting data group number which an error occurred will be set onto the member of err_no of ODBERR structure and the following detailed status will be set onto the member of err_dtno of ODBERR structure.
|
||||||||||||||||||||||||||||||||||||
| EW_NOOPT |
The cutting condition setting function, the edge cutting function and the extended driver/library function are necessary. |
||||||||||||||||||||||||||||||||||||
| EW_PARAM |
Mistake of laser oscillator (parameter No.15030) |
laser\cnc_wrpscdpirc
Writes the piercing data of the cutting condition file.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrpscdpirc(unsigned short FlibHndl,short s_no, short *number, IODBPIRC *pircing);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| s_no | in |
Specify the start piercing data group number. ・Series 16i/18i-L
・Series 30i/31i-LB When addition of the cutting condition data option is not provided.
When addition of the cutting condition data option is provided.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| number | in/out |
Pointer to the number of piercing data. Specify the number of piercing data to be written before function call, and the number of piercing data being written actually is stored after the function call. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pircing | in |
Pointer to the IODBPIRC structure including the piercing data of the cutting condition file. The IODBPIRC structure is as follows.
・Series 16i/18i-L
typedef struct iodbpirc {
short slct; /* Flag of data selection */
short power; /* Peak power */
short freq; /* Initial frequency */
short duty; /* Initial duty */
short i_freq; /* Step frequency */
short i_duty; /* Step duty */
short step_t; /* Step time */
short step_sum; /* Step number */
long pier_t; /* Piercing time */
short g_press; /* Assist gas pressure */
short g_kind; /* Assist gas select */
short g_time; /* Assist gas setting time */
short def_pos; /* Reference displace */
short reserve[4]; /* (reserve) */
} IODBPIRC ;
・Series 30i/31i-LB
typedef struct iodbpirc {
short slct; /* Flag of data selection */
short power; /* Peak power */
short freq; /* Initial frequency */
short duty; /* Initial duty */
short i_freq; /* Step frequency */
short i_duty; /* Step duty */
short step_t; /* Step time */
short step_sum; /* Step number */
long pier_t; /* Piercing time */
short g_press; /* Assist gas pressure */
short g_kind; /* Assist gas select */
short g_time; /* Assist gas setting time */
short def_pos; /* Reference displace */
long def_pos2; /* Reference displace 2 */
char gap_axis; /* Gap control axis */
char def_pos2_dec;/* Decimals places */
short reserve; /* (reserve) */
} IODBPIRC ;
|
ERRORS
| Code | Description | |||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_FUNC |
This function cannot be used except 16i/18i-L, 30i/31i-LB. |
|||||||||||||||||||||||||||||||||||||||
| EW_LENGTH |
Number of data(number) is wrong. |
|||||||||||||||||||||||||||||||||||||||
| EW_NUMBER |
Start number(s_no) is wrong. |
|||||||||||||||||||||||||||||||||||||||
| EW_DATA |
The piercing data of the cutting condition file is wrong. In order to get more information for this err_no return value, execute cnc_getdtailerr function. The piercing data group number which an error occurred will be set onto the member of err_no of ODBERR structure, and the following detailed status will be set onto the member of err_dtno of ODBERR structure.
|
|||||||||||||||||||||||||||||||||||||||
| EW_NOOPT |
The cutting condition setting function and the extended driver/library function are necessary. |
|||||||||||||||||||||||||||||||||||||||
| EW_PARAM |
Mistake of laser oscillator (parameter No.15030) |
laser\cnc_wrpscdproc
Writes the cutting data of the cutting condition file.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrpscdproc(unsigned short FlibHndl,short s_no, short *number, IODBPSCD *pscd);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| s_no | in |
Specify the start cutting data group number. ・Series 16i/18i-L
・Series 30i/31i-LB When addition of the cutting condition data option is not provided.
When addition of the cutting condition data option is provided.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| number | in/out |
Pointer to the number of cutting data. Specify the number of cutting data to be written before function call, and the number of cutting data being written actually is stored after the function call. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pscd | in |
Pointer to the IODBPSCD structure including the cutting data of the cutting condition file. The IODBPSCD structure is as follows.
・Series 16i/18i-L
typedef struct iodbpscd {
short slct; /* Flag of data selection */
long feed; /* Feedrate */
short power; /* Cutting peak power */
short freq; /* Cutting frequency */
short duty; /* Cutting duty */
short g_press; /* Assist gas pressure */
short g_kind; /* Assist gas select */
short g_ready_t; /* Assist gas setting time */
short displace; /* Reference displace */
long supple; /* Beam radius offset */
short edge_slt; /* Edge cutting select */
short appr_slt; /* Start-up select */
short pwr_ctrl; /* Power control */
short reserve[4]; /* (reserve) */
} IODBPSCD ;
・Series 30i/31i-LB
typedef struct iodbpscd {
short slct; /* Flag of data selection */
long feed; /* Feedrate */
short power; /* Cutting peak power */
short freq; /* Cutting frequency */
short duty; /* Cutting duty */
short g_press; /* Assist gas pressure */
short g_kind; /* Assist gas select */
short g_ready_t; /* Gas setting time */
short displace; /* Reference displace */
long supple; /* Beam radius offset */
short edge_slt; /* Edge cutting select */
short appr_slt; /* Start-up select */
short pwr_ctrl; /* Power control */
long displace2; /* Reference displace */
char gap_axis; /* Gap control axis */
char feed_dec; /* Decimals places */
char supple_dec; /* Decimals places */
char dsp2_dec; /* Decimals places */
} IODBPSCD ;
|
ERRORS
| Code | Description | |||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_FUNC |
This function cannot be used except 16i/18i-L , 30i/31i-LB. |
|||||||||||||||||||||||||||||||||||||||
| EW_LENGTH |
Number of data(number) is wrong. |
|||||||||||||||||||||||||||||||||||||||
| EW_NUMBER |
Start number(s_no) is wrong. |
|||||||||||||||||||||||||||||||||||||||
| EW_DATA |
The cutting data of the cutting condition file is wrong. In order to get more information for this err_no return value, execute cnc_getdtailerr function. The cutting data group number which an error occurred will be set onto the member of err_no of ODBERR structure and the following detailed status will be set onto the member of err_dtno of ODBERR structure.
|
|||||||||||||||||||||||||||||||||||||||
| EW_NOOPT |
The cutting condition setting function and the extended driver/library function are necessary. |
|||||||||||||||||||||||||||||||||||||||
| EW_PARAM |
Mistake of laser oscillator (parameter No.15030) |
laser\cnc_wrpscdslop
Writes the slope control data of the cutting condition file.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrpscdslop(unsigned short FlibHndl,short s_no, short *number, IODBSLOP *slope);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| s_no | in |
Specify the start slope control data group number.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| number | in/out |
Pointer to the number of slope control data. Specify the number of slope control data to be written before function call, and the number of slope control data being written actually is stored after the function call. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| slope | out |
Pointer to the IODBSLOP structure including the slope control data of the cutting condition file. The IODBSLOP structure is as follows.
typedef struct iodbslop {
long slct; /* Flag of data selection */
long upleng; /* Step(UP) distance */
short upsp[10]; /* Step(UP) power 1 to 10 */
long dwleng; /* Step(DOWN) distance */
short dwsp[10]; /* Step(DOWN) power 1 to 10 */
short reserve[10];/* (reserve) */
} IODBSLOP ;
|
ERRORS
| Code | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_FUNC |
This function cannot be used except 16i/18i-L. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_LENGTH |
Number of data(number) is wrong. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_NUMBER |
Start number(s_no) is wrong. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_DATA |
The slope control data of the cutting condition file is wrong. In order to get more information for this err_no return value, execute cnc_getdtailerr function. The slope control data group number which an error occurred will be set onto the member of err_no of ODBERR structure, and the following detailed status will be set onto the member of err_dtno of ODBERR structure.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_NOOPT |
The cutting condition setting function, the slope control function and the extended driver/library function are necessary. |
misc\cnc_adcnv
Reads the A/D conversion data. The A/D conversion data is stored in "data" of "ODBAD".
PROTOTYPE
FWLIBAPI short WINAPI cnc_adcnv(unsigned short FlibHndl, short inp_type, short av_type, ODBAD *adcnv);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| inp_type | in |
Specify the type of analog voltage input.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| av_type | in |
Specify the kind of analog voltage(specification of connector).
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| adcnv | out |
Pointer to the ODBAD structure including A/D conversion data. The ODBAD structure is as follows.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| inp_type | in |
Specify the type of analog voltage input.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| av_type | in |
Specify the kind of analog voltage(specification of connector).
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| adcnv | out |
Pointer to the ODBAD structure including A/D conversion data. The ODBAD structure is as follows.
typedef struct odbad {
short datano ; /* type of analog voltage input */
short type ; /* kind of analog voltage
(specification of connector) */
short data ; /* digital voltage */
} ODBAD ;
|
ERRORS
| Code | Description |
|---|---|
| EW_NUMBER |
The type of analog voltage input (inp_type) is wrong. |
| EW_ATTRIB |
The kind of analog voltage (av_type) is wrong. |
misc\cnc_alarm
PROTOTYPE
FWLIBAPI short WINAPI cnc_alarm(unsigned short FlibHndl, ODBALM *alarm);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| alarm | out |
Pointer to the ODBALM structure including the alarm status information. The ODBALM structure is as follows.
typedef struct odbalm {
short dummy[2] ; /* Not used. */
short data ; /* Alarm status */
} ODBALM ;
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| alarm | out |
Pointer to the ODBALM structure including the alarm status information. The ODBALM structure is as follows.
typedef struct odbalm {
short dummy[2] ; /* Not used. */
short data ; /* Alarm status */
} ODBALM ;
|
ERRORS
| Code | Description |
|---|---|
| EW_PARAM(Only Series 15) |
|
misc\cnc_alarm2
Reads the alarm status of CNC. This function is the improved version of the cnc_alarm function.
This function is used for watching CNC's alarm status, displaying the maintenance information or guidance of how to reset the alarm, etc.
When CNC falls into the system alarm, it is completely impossible to communicate data with CNC, and the alarm status cannot be acquired.
PROTOTYPE
FWLIBAPI short WINAPI cnc_alarm2(unsigned short FlibHndl, long *alarm);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| alarm | out |
Specify the address of the variable which is set the alarm status. The meaning of each bit is as follows.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| alarm | out |
Specify the address of the variable which is set the alarm status. The meaning of each bit is as follows.
|
ERRORS
| Code | Description |
|---|
misc\cnc_cexesramsize
Reads the maximum size of the SRAM variable area for C language executor. The maximum size is read by the unit of byte.
PROTOTYPE
FWLIBAPI short WINAPI cnc_cexesramsize(unsigned short FlibHndl, long *length);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| length | out |
Pointer to the maximum size storage area. |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
The user application is not built into CNC. The C language executor library does not support this function. |
| EW_NOOPT |
The C language executor function and the extended driver/library function are necessary. |
misc\cnc_chgprotbit
The protection pattern data is bit pattern data which collects flags corresponding to various NC data. It is for MTB and for the end user.
This data should be set on each NC, and the data is read to the application during the start of application by the Ethernet library in the each process (copy image of the protection pattern data).
In this function, the copy image of the protection pattern data can be changed.
The copy image of the protection pattern data is independent at each process, and the change is effective only to the one which the process by which this function is issued maintains.
Please specify the same key word as the password set on NC for the argument when changing.
Especially, when 0 is specified for the key word, the copy image of the protection pattern data is reset in the original data set on NC.
Error code EW_PASSWD returns when an incorrect key word is specified.
PROTOTYPE
FWLIBAPI short WINAPI cnc_chgprotbit(unsigned short FlibHndl, short user_id, unsigned char *pattern, long keyword);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||
| user_id | in |
The user (MTB and the end user) who protects the NC data is specified.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||
| pattern | in/out |
It is a pointer to data which stores the bit pattern by which the NC data which removes protection is specified. Please secure the consecutive area in four bytes to store data.
When one is set to the bit, it is meant to remove corresponding NC data protection. The meaning of each bit is as follows.
After the function is executed, the current bit pattern by which the modified state of various NC data protection is shown is returned. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||
| keyword | in |
It is a key word transmitted to NC . The decimal number of eight digits or less can be specified. |
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_FUNC |
The NC control software or the Ethernet firmware does not support this function. |
|||||||||
| EW_NUMBER |
The specification of user_id is wrong. |
|||||||||
| EW_PASSWD |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
misc\cnc_clralm
Clears the CNC alarm state specified by "id".
PROTOTYPE
FWLIBAPI short WINAPI cnc_clralm(unsigned short FlibHndl, short id);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| id | in |
Specify the kind of CNC alarm to be cleared
|
ERRORS
| Code | Description |
|---|---|
| EW_ATTRIB |
The kind of CNC alarm(id) is invalid. |
misc\cnc_diagnosr
It is impossible to read any bit diagnosis data bit by bit. 8 bits (i.e. 1 byte) which belong to the same diagnosis data number are read at the same time.
See the "MAINTENANCE MANUAL" of CNC for details of each diagnosis data.
Diagnosis data type
Meaning
Byte size
Bit diagnosis data
Every bits have each definition.
1
Bit diagnosis data with axis
Every bits have each definition. (each axis)
1
Byte diagnosis data
1-byte data is stored.
1
Byte diagnosis data with axis
1-byte data is stored. (each axis)
1
Word diagnosis data
2-byte data is stored.
2
Word diagnosis data with axis
2-byte data is stored. (each axis)
2
2-Word diagnosis data
4-byte data is stored.
4
2-Word diagnosis data with axis
4-byte data is stored. (each axis)
4
Real diagnosis
(Series 15i, 30i, 0i-D/F, PMi-A)
4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored.
8
Real diagnosis with axis
(Series 15i, 30i, 0i-D/F, PMi-A)
4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored. (each axis)
8
PROTOTYPE
FWLIBAPI short WINAPI cnc_diagnosr(unsigned short FlibHndl, short *s_number, short axis, short *e_number, short *length, void *diag);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||
| s_number | in/out |
Specify the start diagnosis data number. The first diagnosis data number which was read actually is returned. See the "MAINTENANCE MANUAL" of CNC about available diagnosis data number. It can be got by cnc_rddiagnum function and cnc_rddiaginfo function. |
|||||||||||||||||||||||||||
| e_number | in/out |
|
|||||||||||||||||||||||||||
| axis | in |
Specify the axis number.
None axis type diagnosis data can be read even if any value is specified in "axis". In case that an axis type diagnosis data exists in the specified range, the error(Retuen:EW_ATTRIB) is returned by specifying "axis=0". |
|||||||||||||||||||||||||||
| length | in |
[= Sum of (4+(byte size of each diagnosis data) * (number of axis))]Because the size of data which was read actually is returned, it is possible to specify the length more than the actual size. In case that the size of diagnosis data is 2 byte, the ODBDGN structure is as follows. In case that the size of diagnosis data is 1 or 2 byte and the length per 1 diagnosis data is not a multiple of 4, 'dummy' is necessary at the end of structure. In case that its size is 4 or 8 byte, the size of data part per 1 diagnosis data or 1 axis is 4 or 8 byte, and so 'dummy' is not necessary. ODBDGN
|
|||||||||||||||||||||||||||
| diag | out |
Pointer to the area to store the diagnoses. Each diagnosis data can be referred by using the ODBDGN structure.
|
|||||||||||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||
| s_number | in/out |
Specify the start diagnosis data number. The first diagnosis data number which was read actually is returned. See the "MAINTENANCE MANUAL" of CNC about available diagnosis data number. It can be got by cnc_rddiagnum function and cnc_rddiaginfo function. |
|||||||||||||||||||||||||||
| e_number | in/out |
|
|||||||||||||||||||||||||||
| axis | in |
Specify the axis number.
None axis type diagnosis data can be read even if any value is specified in "axis". In case that an axis type diagnosis data exists in the specified range, the error(Retuen:EW_ATTRIB) is returned by specifying "axis=0". |
|||||||||||||||||||||||||||
| length | in |
[= Sum of (4+(byte size of each diagnosis data) * (number of axis))]Because the size of data which was read actually is returned, it is possible to specify the length more than the actual size. In case that the size of diagnosis data is 2 byte, the ODBDGN structure is as follows. In case that the size of diagnosis data is 1 or 2 byte and the length per 1 diagnosis data is not a multiple of 4, 'dummy' is necessary at the end of structure. In case that its size is 4 or 8 byte, the size of data part per 1 diagnosis data or 1 axis is 4 or 8 byte, and so 'dummy' is not necessary. ODBDGN
|
|||||||||||||||||||||||||||
| diag | out |
Pointer to the area to store the diagnoses. Each diagnosis data can be referred by using the ODBDGN structure.
typedef struct realdgn { /* real diagnosis data */
long dgn_val; /* value of variable */
long dec_val; /* number of places of decimals */
} REALDGN ;
typedef struct odbdgn {
short datano; /* diagnosis data number */
short type; /* upper byte:type */
/* lower byte:axis */
union {
char cdata; /* bit/byte diagnosis data */
short idata; /* word diagnosis data */
long ldata; /* 2-word diagnosis data */
REALDGN rdata; /* real diagnosis data */
char cdatas[MAX_AXIS];/* bit/byte diagnosis data with axis */
short idatas[MAX_AXIS];/* word diagnosis data with axis */
long ldatas[MAX_AXIS];/* 2-word diagnosis data with axis */
REALDGN rdatas[MAX_AXIS];/* real diagnosis data with axis */
} u ;
} ODBDGN ; /* MAX_AXIS : max. controlled axes */
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of area to store diagnosis data (length) is wrong. |
| EW_NUMBER |
diagnosis data number (s_number, e_number) is wrong. |
| EW_ATTRIB |
Axis number (axis) is wrong. |
misc\cnc_diagnoss
It is impossible to read any bit diagnosis data bit by bit. 8 bits (i.e. 1 byte) which belong to the same diagnosis number are read at the same time.
See the "MAINTENANCE MANUAL" of CNC for details of each diagnosis.
Diagnosis data type
Meaning
Byte size
Bit diagnosis data
Every bits have each definition.
1
Bit diagnosis data with axis
Every bits have each definition. (each axis)
1
Byte diagnosis data
1-byte data is stored.
1
Byte diagnosis data with axis
1-byte data is stored. (each axis)
1
Word diagnosis data
2-byte data is stored.
2
Word diagnosis data with axis
2-byte data is stored. (each axis)
2
2-Word diagnosis data
4-byte data is stored.
4
2-Word diagnosis data with axis
4-byte data is stored. (each axis)
4
Real diagnosis
(Series 15i, 30i, 0i-D/F, PMi-A)
4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored.
8
Real diagnosis with axis
(Series 15i, 30i, 0i-D/F, PMi-A)
4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored. (each axis)
8
PROTOTYPE
FWLIBAPI short WINAPI cnc_diagnoss(unsigned short FlibHndl, short number, short axis, short length, ODBDGN *diag);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||
| number | in |
Specify the diagnosis number. See the "MAINTENANCE MANUAL" of CNC about available diagnosis data number. It can be got by cnc_rddiagnum function and cnc_rddiaginfo function. |
|||||||||||||||||||||||||||
| axis | in |
Specify the axis number.
|
|||||||||||||||||||||||||||
| length | in |
Specify the data block length(size of ODBDGN structure). 4+(byte size of diagnosis data) * (number of axis) In case that the size of diagnosis data is 4 byte, the ODBDGN structure is as follows. In case that its size is 1, 2, or 8 byte, the size of data part per 1 diagnosis data or 1 axis is 1, 2, or 8 byte. ODBDGN
Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i : n = Current controlled axes |
|||||||||||||||||||||||||||
| diag | out |
Pointer to the ODBDGN structure including the diagnosis data. The ODBDGN structure is as follows.
|
|||||||||||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||
| number | in |
Specify the diagnosis data number. See the "MAINTENANCE MANUAL" of CNC about available diagnosis data number. It can be got by cnc_rddiagnum function and cnc_rddiaginfo function. |
|||||||||||||||||||||||||||
| axis | in |
Specify the axis number.
|
|||||||||||||||||||||||||||
| length | in |
Specify the data block length(size of ODBDGN structure). 4+(byte size of diagnosis data) * (number of axis) In case that the size of diagnosis data is 4 byte, the ODBDGN structure is as follows. In case that its size is 1, 2, or 8 byte, the size of data part per 1 diagnosis data or 1 axis is 1, 2, or 8 byte. ODBDGN
|
|||||||||||||||||||||||||||
| diag | out |
Pointer to the ODBDGN structure including the diagnosis data. The ODBDGN structure is as follows.
typedef struct realdgn { /* real diagnosis data */
long dgn_val; /* value of variable */
long dec_val; /* number of places of decimals */
} REALDGN ;
typedef struct odbdgn {
short datano; /* diagnosis data number */
short type; /* axis */
union {
char cdata; /* bit/byte diagnosis data */
short idata; /* word diagnosis data */
long ldata; /* 2-word diagnosis data */
REALDGN rdata; /* real diagnosis data */
char cdatas[MAX_AXIS];/* bit/byte diagnosis data with axis */
short idatas[MAX_AXIS];/* word diagnosis data with axis */
long ldatas[MAX_AXIS];/* 2-word diagnosis data with axis */
REALDGN rdatas[MAX_AXIS];/* real diagnosis data with axis */
} u ;
} ODBDGN ; /* MAX_AXIS : max. controlled axes */
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of ODBDGN structure (length) is wrong. |
| EW_NUMBER |
diagnosis data number (number) is wrong. |
| EW_ATTRIB |
Axis number (axis) is wrong. |
misc\cnc_fromget
Reads the F-ROM data from CNC.
The procedure for reading F-ROM data and storing into the file is as follows.
Any file name can be specified for the file in which F-ROM data will be stored. Internal 128KB buffer is prepared for data reading. The total size which can be read finally is F-ROM size(fromsize) acquired by the cnc_getfrominfo function.
After F-ROM data reading, execute cnc_fromgetend function in order to indicate the termination of reading process.
In this function, the F-ROM data is read from CNC every 128 Kbyte block and then the data is output to the application.
It takes for a while to read the 128 Kbyte block of F-ROM data from CNC.
This function waits its process completion in the library.
PROTOTYPE
FWLIBAPI short WINAPI cnc_fromget(unsigned short FlibHndl, short *stat, void *data, long *length);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| stat | out |
Specify the address of the variable in which the reading state of F-ROM is stored.
Call the cnc_fromgetend function in case of stat=0. |
||||||
| data | out |
Pointer to the variable to which the reading data is stored. |
||||||
| length | in/out |
Pointer to the variable to which the data length was set. |
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_FUNC |
|
||||||
| EW_BUFFER |
Retry because the buffer is empty. |
||||||
| EW_LENGTH |
|
||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
||||||
| EW_PROT |
|
misc\cnc_fromgetend
Indicates the termination of reading the F-ROM data from CNC.
PROTOTYPE
FWLIBAPI short WINAPI cnc_fromgetend(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_FUNC |
|
|||||||||
| EW_DATA |
When the EW_DATA error occurred at cnc_fromget function, the same return value is returned. In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
misc\cnc_fromgetstart
Indicates the start of reading the F-ROM data from CNC.
However, the system control software cannot be read.
PROTOTYPE
FWLIBAPI short WINAPI cnc_fromgetstart(unsigned short FlibHndl, short slotno, char *name);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| slotno | in |
Specify the physical slot number of control P.C.B. where F-ROM from which you want to read data is mounted. |
| name | in |
Specify the System data name (sysname) acquired by cnc_getfrominfo function. |
ERRORS
| Code | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_FUNC |
|
||||||||||||
| EW_BUSY |
cnc_fromgetstart function has been already executed. Terminate a reading process by using cnc_fromgetend function. |
||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
|
||||||||||||
| EW_REJECT |
|
||||||||||||
| EW_PASSWD |
|
misc\cnc_fromput
Writes the F-ROM data to CNC. The procedure for reading F-ROM data from the file and storing into the F-ROM on the CNC is as follows.
Internal 128KB buffer is prepared for data writing.
It takes for a while to write the 128K Byte block of F-ROM data to CNC. When this function writes the F-ROM data to CNC, the error (such as EW_DATA) may happen, so please check the return value of this function at your application. The Size of SYSTEM data(Control software, Ladder program etc.) is 128K Bytes * n(n=1,2,3,...) + 128 Bytes.
You must write all data from F-ROM file by this function.
After F-ROM data writing, execute cnc_fromputend function in order to indicate the termination of writing process.
When the data transferred by the cnc_fromput function becomes 128KB (at the first time, 128KB+128bytes), the CNC executes the writing process to F-ROM.
This function waits its process completion in the library.
PROTOTYPE
FWLIBAPI short WINAPI cnc_fromput(unsigned short FlibHndl, void *data, long *length);
ARGUMENTS
| Name | Direction | Description | ||
|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||
| data | in |
Pointer to the variable to which the writing data is stored. |
||
| length | in/out |
Pointer to the variable to which the data length was set.
|
ERRORS
| Code | Description | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_FUNC |
|
|||||||||||||||||||||
| EW_BUFFER |
Retry because the buffer is full. |
|||||||||||||||||||||
| EW_LENGTH |
|
|||||||||||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr . The following detail status will be set onto the member, err_no of ODBERR structure.
|
|||||||||||||||||||||
| EW_PASSWD |
|
misc\cnc_fromputend
The lacked area for F-ROM data on CNC is buried by code, 0xFF.
PROTOTYPE
FWLIBAPI short WINAPI cnc_fromputend(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
ERRORS
| Code | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_FUNC |
|
||||||||||||||||||||||||
| EW_DATA |
When the EW_DATA error occurred by cnc_fromput function, the same return value is returned. In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
misc\cnc_fromputstart
Indicates the start of writing the F-ROM data to CNC.
The data which can be written in F-ROM is system data (CNC Control software and Ladder program, etc.), but any other data cannot be written.
However, the system control software cannot be written.
PROTOTYPE
FWLIBAPI short WINAPI cnc_fromputstart(unsigned short FlibHndl, short slotno);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| slotno | in |
Physical slot number(0,1,2,...,15) |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
| EW_BUSY |
cnc_fromputstart function has been already executed. Terminate a reading process by using cnc_fromputend function. |
| EW_DATA |
|
| EW_REJECT |
|
misc\cnc_fromremove
Deletes the System data from F-ROM on CNC.
However, the system control software cannot be deleted in the Ethernet version.
PROTOTYPE
FWLIBAPI short WINAPI cnc_fromremove(unsigned short FlibHndl, short slotno, char *name);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| slotno | in |
Physical slot number (0,1,2,...,15) |
| name | in |
The name of the system data which you want to delete. |
ERRORS
| Code | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_FUNC |
|
||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
||||||||||||
| EW_REJECT |
|
||||||||||||
| EW_PASSWD |
|
misc\cnc_getdtailerr
The detailed error information is stored in "err_no", "err_dtno" of "ODBERR".
PROTOTYPE
FWLIBAPI short WINAPI cnc_getdtailerr(unsigned short FlibHndl, ODBERR *err);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| err | out |
Pointer to the ODBERR structure to set the detailed error information. The ODBERR structure is as follows.
typedef struct odberr{
short err_no; /* Detailed error */
short err_dtno; /* Data number on error */
} ODBERR ;
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The extended driver/library function is necessary. |
misc\cnc_getfigure
Reads the maximum valid figures and the number of decimal places under the input/output unit, which is related to various data of CNC.
The value which is read by the window library is binary data under the unit of the CNC side. Therefore, it is nesessary to display a decimal point, etc. in consideration of the unit.
PROTOTYPE
FWLIBAPI short WINAPI cnc_getfigure(unsigned short FlibHndl, short data_type,short *valid_fig, short *dec_fig_in, short *dec_fig_out);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||
| data_type |
|
||||||||||||||||
| valid_fig |
Specify the address of the variable to store the maximum valid figures. |
||||||||||||||||
| dec_fig_in |
Specify the address of the array to store the number of decimal places under the input unit. The number of array must be equal to the number of maximum controlled axis. (Except axis type data, only the top of array is valid.) |
||||||||||||||||
| dec_fig_out |
Specify the address of the array to store the number of decimal places under the output unit. The number of array must be equal to the number of maximum controlled axis. (Except axis type data, only the top of array is valid.) |
||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||
| data_type |
|
||||||||||||||||
| valid_fig |
Specify the address of the variable to store the maximum valid figures. |
||||||||||||||||
| dec_fig_in |
Specify the address of the array to store the number of decimal places under the input unit. The number of array must be equal to the number of maximum controlled axis. (Except axis type data, only the top of array is valid.) |
||||||||||||||||
| dec_fig_out |
Specify the address of the array to store the number of decimal places under the output unit. The number of array must be equal to the number of maximum controlled axis. (Except axis type data, only the top of array is valid.) |
ERRORS
| Code | Description |
|---|---|
| EW_ATTRIB |
Kind of data (data_type) is wrong. |
| EW_NOOPT |
The extended driver/library function is necessary. |
misc\cnc_getfrominfo
Reads the various information of F-ROM on CNC. The various information is stored in each member of "ODBFINFORM".
PROTOTYPE
FWLIBAPI short WINAPI cnc_getfrominfo(unsigned short FlibHndl, short slotno, short *num, ODBFINFORM *finfo);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| slotno | in |
Specify the physical slot number of control P.C.B. where F-ROM is mounted. Especially, if you set the '-1', all F-ROM information in the CNC can be read. When this function is executed as 'slotno=-1', the effective F-ROM information is packed from a head of the address shown by this argument. |
||||||
| num | out |
When a physical slot number of the P.C.B which does not exist in slotno is specified, the '0' is set in *num. |
||||||
| finfo | out |
Specify the address of the array of ODBFINFORM structure storing the F-ROM information.
typedef struct odbfinform {
long slotno; /* Slot Number */
char slotname[12]; /* Slot Name */
long fromnum; /* Number of F-ROM SYSTEM data */
struct {
char sysname[12]; /* F-ROM SYSTEM data Name */
long fromsize; /* F-ROM Size */
long fromattrib; /* F-ROM Data attribute */
} info[128];
} ODBFINFORM;
|
ERRORS
| Code | Description | |||
|---|---|---|---|---|
| EW_FUNC |
|
|||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure. And the slot number where an error occurred will be set in err_dtno of ODBERR structure.
|
|||
| EW_REJECT |
|
misc\cnc_getlanguage
The display language of NC is acquired.
PROTOTYPE
FWLIBAPI short WINAPI cnc_getlanguage(unsigned short FlibHndl, short *language);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the address of the variable to store the maximum valid figures. |
|||||||||||||||||||||||||||||||||||||||||||||||||||
| language | out |
Specify the pointer to store the display language of NC.
|
ERRORS
| Code | Description |
|---|
misc\cnc_getlockstat
Gets the present state of various NC data protection.
PROTOTYPE
FWLIBAPI short WINAPI cnc_getlockstat(unsigned short FlibHndl, short user_id, unsigned char *pattern);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| user_id | in |
The user (MTB and the end user) who protects the NC data is specified.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pattern | out |
It is a pointer to data which stores the bit pattern by which the NC data to be protected is shown.
Moreover, when each bit is set to one, the functions that return EW_PASSWD are as follows.
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
The NC control software or the Ethernet firmware does not support this function. |
| EW_NUMBER |
The specification of user_id is wrong. |
misc\cnc_getpath
Reads the current selected path number which is the target path of the Data window functions.
PROTOTYPE
FWLIBAPI short WINAPI cnc_getpath(unsigned short FlibHndl, short *path_no, short *maxpath_no);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||
| path_no | in |
Specify the address of the variable which is set the path number.
|
|||||||||||||||||||||||||||||||||
| maxpath_no | out |
Specify the address of the variable which is set the maximum path number. |
|||||||||||||||||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||
| path_no | in |
|
ERRORS
| Code | Description |
|---|
misc\cnc_getsraminfo
Reads the various information of S-RAM on CNC.
The various information is stored in each member of "ODBSINFO".
PROTOTYPE
FWLIBAPI short WINAPI cnc_getsraminfo(unsigned short FlibHndl, ODBSINFO *sinfo);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| sinfo | out |
Specify the address of the array of ODBSINFO structure storing the S-RAM information. ODBSINFO structure is as follows.
typedef struct odbsinfo {
long sramnum; /* Number of S-RAM data */
struct {
char sramname[12]; /* S-RAM data Name */
long sramsize; /* S-RAM data Size */
short divnumber; /* Division number of S-RAM file */
char fname[6][16]; /* S-RAM file names */
} info[8];
} ODBSINFO;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
misc\cnc_gettimer
Gets the date or time data from the calendar timer device of the CNC unit.
PROTOTYPE
FWLIBAPI short WINAPI cnc_gettimer(unsigned short FlibHndl, IODBTIMER *buf);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||
| buf | out |
Pointer to the IODBTIMER structure including the date or time of CNC. The IODBTIMER structure is as follows.
typedef struct iodbtimer {
short type ; /* Spec. of date or time. */
short dummy ; /* Not used. */
union {
struct {
short year ; /* Year. */
short month ; /* Month. */
short date ; /* Date. */
} date ;
struct {
short hour ; /* Hour. */
short minute ;/* Minute. */
short second ;/* Second. */
} time ;
} data ;
} IODBTIMER ;
Specify one of the following values in "buf.type". (It is impossible to get both date and time simultaneously.)
The date value or time value in each member of "buf.data.date" or "buf.data.time" with binary format is stored as follows.
That is, the following data can be gotten from CNC.
|
|||||||||||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||
| buf | out |
Pointer to the IODBTIMER structure including the date or time of CNC. The IODBTIMER structure is as follows.
typedef struct iodbtimer {
short type ; /* Spec. of date or time. */
short dummy ; /* Not used. */
union {
struct {
short year ; /* Year. */
short month ; /* Month. */
short date ; /* Date. */
} date ;
struct {
short hour ; /* Hour. */
short minute ;/* Minute. */
short second ;/* Second. */
} time ;
} data ;
} IODBTIMER ;
Specify one of the following values in "buf.type". (It is impossible to get both date and time simultaneously.)
The date value or time value in each member of "buf.data.date" or "buf.data.time" with binary format is stored as follows.
|
ERRORS
| Code | Description |
|---|---|
| EW_NUMBER |
|
misc\cnc_modal
The union type which stores the data depends on the type of modal data (type). Therefore, in case of accessing data, use the union corresponding to the type.
As for the data that are added at Series 30i, 0i-D/F and PMi-A, please use cnc_rdgcode and cnc_rdcommand functions.
PROTOTYPE
FWLIBAPI short WINAPI cnc_modal(unsigned short FlibHndl, short type, short block, ODBMDL *modal);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type | in |
Type of data is stored. (refer to the following)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| block | in |
Assigned block in stored.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| modal | out |
Pointer to the ODBMDL structure including the modal data. The ODBMDL structure is as follows.
typedef struct odbmdl {
short datano; /* Kind of modal data */
short type; /* Objective block */
union {
char g_data; /* Modal data of G code */
char g_rdata[35]; /* Modal data of G code */
char g_1shot[4]; /* Modal data of 1 shot G code*/
struct {
long aux_data;
/* Modal data other than G code */
char flag1; /* Flag 1 */
char flag2; /* Flag 2 */
}aux;
struct {
long aux_data;
/* Modal data other than G code */
char flag1; /* Flag 1 */
char flag2; /* Flag 2 */
}raux1[27];
struct {
long aux_data;
/* Modal data other than G code */
char flag1; /* Flag 1 */
char flag2; /* Flag 2 */
}raux2[MAX_AXIS];
}modal; /* MAX_AXIS : max. controlled axes. */
} ODBMDL ;
(1) Reading modal G code.
For example, the following result is gotten by calling this function during executing N100's block of the next machining program. (for M of Series 16i/18i/21i, 0i-A/B/C, Power Mate i)
N090 G18 ; N100 G1 Z100. ; N110 G17 G2 X10. Y-20. R12. ; To read all "type" concerning G code at a time, -1 is specified. The array of g_data is stored in g_rdata. (2) Reading modal data other than G code.
To read "type" concerning 100's at a time, -2 is specified. The data is stored in the user define type of ODBMDL4.
[M] is read as a modal data on M series and a commanded data on T series. To read "type" concerning 100's at a time, -2 is specified. The data is stored in the array of raux1. To read "type" concerning 200's at a time, -3 is specified. The data is stored in the array of raux2.
[M] is read as a modal data on M series and a commanded data on T series. To read "type" concerning 100's at a time, -2 is specified. The data is stored in the array of raux1. To read "type" concerning 200's at a time, -3 is specified. The data is stored in the array of raux2.
To read "type" concerning 100's at a time, -2 is specified. The data is stored in the array of raux1.
(3) Read modal data of one shot G code
The numerical value of "g_1shot" mentioned in the above table is stored in the bit 0,..,bit 6 of each array in "g_1shot" with binary format. Whether this G code is commanded in the objective block specified by "block" or not is stored in the bit 7 of "
To read "type" concerning 1 shot G code at a time, -4 is specified. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type | in |
Type of data is stored. (refer to the following)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| block | in |
Assigned block in stored.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| modal | out |
Pointer to the ODBMDL structure including the modal data. The ODBMDL structure is as follows.
typedef struct odbmdl {
short datano; /* Kind of modal data */
short type; /* Objective block */
union {
char g_data; /* Modal data of G code */
char g_rdata[35]; /* Modal data of G code */
char g_1shot[4]; /* Modal data of 1 shot G code*/
struct {
long aux_data;
/* Modal data other than G code */
char flag1; /* Flag 1 */
char flag2; /* Flag 2 */
}aux;
struct {
long aux_data;
/* Modal data other than G code */
char flag1; /* Flag 1 */
char flag2; /* Flag 2 */
}raux1[27];
struct {
long aux_data;
/* Modal data other than G code */
char flag1; /* Flag 1 */
char flag2; /* Flag 2 */
}raux2[MAX_AXIS]; /* MAX_AXIS : max. controlled axes. */
}modal;
} ODBMDL ;
(1) Reading modal G code.
For example, the following result is gotten by calling this function during executing N100's block of the next machining program. (for M of Series 30is) N090 G18 ; N100 G1 Z100. ; N110 G17 G2 X10. Y-20. R12. ; To read all "type" concerning G code at a time, -1 is specified. (2) Reading modal data other than G code.
[M] is read as a modal data on M series and a commanded data on T series. To read "type" concerning 100's at a time, -2 is specified. The data is stored in the array of raux1. To read "type" concerning 200's at a time, -3 is specified. The data is stored in the array of raux2.
(3) Read modal data of one shot G code
The numerical value of "g_1shot" mentioned in the above table is stored in the bit 0,..,bit 6 of each array in "g_1shot" with binary format. Whether this G code is commanded in the objective block specified by "block" or not is stored in the bit 7 of "
To read "type" concerning 1 shot G code at a time, -4 is specified. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ERRORS
| Code | Description |
|---|---|
| EW_NUMBER |
The specification of modal data (type) is wrong. |
| EW_ATTRIB |
The specification of block (block)is wrong. |
misc\cnc_rd3dcdcnv
These are stored in each member of ODB3DCD structure.
The places of decimal points can be got by cnc_getfigure function.
The unit of angle follows CNC parameter 6400#2.
6400#2=0
:
0.00001
deg
(1/100,000)
6400#2=1
:
0.001
deg
PROTOTYPE
FWLIBAPI short WINAPI cnc_rd3dcdcnv(unsigned short FlibHndl, ODB3DCD *cdcnv);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||
| cdcnv | out |
Pointer to the ODB3DCD structure for the data of the 3-dimensional coordinate conversion.
typedef struct odb3dcd {
short mode; /* 3-D coordinate conversion mode */
short dno; /* number of 3-D coordinate conv. */
short cd_axes[3]; /* axis of 3-D coordinate conv. */
long center[2][3]; /* center of rotation */
long direct[2][3]; /* direction of center */
long angle[2]; /* rotation angle */
} ODB3DCD ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used at 15T/15TT. |
| EW_NOOPT |
The 3-dimensional coordinate system conversion option and the extended driver/library function are necessary. |
misc\cnc_rd3dtofs
Reads the mode and vector of the 3-dimensional tool compensation. These are stored in each member of ODB3DTO structure.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rd3dtofs(unsigned short FlibHndl, ODB3DTO *tofs3d);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||
| tofs3d | out |
Pointer to the ODB3DTO structure for the data of the 3-dimensional tool compensation.
typedef struct odb3dto {
short mode; /* offset mode */
short ofs_axes[3]; /* axis of 3-D tool compensation */
long ofsvct[3]; /* offset vector */
} ODB3DTO ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used at 15T/15TT. |
| EW_NOOPT |
The 3-dimensional cutter compensation option and the extended driver/library function are necessary. |
misc\cnc_rdalminfo
Reads the detailed information of currently arising CNC alarms. Various information is stored in "data" of ALMINFO.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdalminfo(unsigned short FlibHndl, short type, short alm_type, short length, ALMINFO *alarminfo);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type | in |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| alm_type | in |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| length | in |
N is the number of messages to be read.
N is the number of messages to be read. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| alarminfo | out |
typedef struct alminfo {
#if MAX_AXIS > 16 /* Series 15/15i : maximum axis=24 */
/* Series 30i, 0i-D/F, PMi-A */
union {
struct {
struct {
long axis ; /* Axis information */
short alm_no ; /* Alarm number */
} alm[N] ;
long data_end ; /* data end */
} alm1 ;
struct {
struct {
long axis ; /* Axis information */
short alm_no ; /* Alarm number */
short msg_len ; /* Message length */
char alm_msg[32] ; /* Alarm message */
} alm[N] ;
long data_end ; /* data end */
}alm2 ;
} u ;
#else
union {
struct {
struct {
short axis ; /* Axis information */
short alm_no ; /* Alarm number */
} alm[N] ;
short data_end ; /* data end */
} alm1 ;
struct {
struct {
short axis ; /* Axis information */
short alm_no ; /* Alarm number */
short msg_len ; /* Message length */
char alm_msg[32] ; /* Alarm message */
} alm[N] ;
short data_end ; /* data end */
}alm2 ;
} u ;
#endif
} ALMINFO ; /* N : number of messages to be read. */
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type | in |
Specify the type of output format.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| alm_type | in |
Specify the type of alarm.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| length | in |
Specify the length of the data block(size of ALMINFO user define type)
N is the number of messages to be read. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| alarminfo | out |
typedef struct alminfo {
union {
struct {
struct {
long axis ; /* Axis information */
short alm_no ; /* Alarm number */
} alm[N] ;
long data_end ; /* data end */
} alm1 ;
struct {
struct {
long axis ; /* Axis information */
short alm_no ; /* Alarm number */
short msg_len ; /* Message length */
char alm_msg[32] ; /* Alarm message */
} alm[N] ;
long data_end ; /* data end */
}alm2 ;
} u ;
} ALMINFO ; /* N : number of messages to be read. */
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of ALMINFO structure (length) is wrong. |
| EW_NUMBER |
The type of output format (type) is wrong. |
| EW_ATTRIB |
The specification of alarm type (alm_type) is wrong. |
misc\cnc_rdalmmsg
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdalmmsg(unsigned short FlibHndl, short type, short *num, ODBALMMSG *almmsg);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type | in |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| num | in/out |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| almmsg | out |
typedef struct odbalmmsg {
long alm_no ; /* alarm number */
short type ; /* alarm type */
short axis ; /* axis number */
short dummy ; /* reserved */
short msg_len ; /* message length */
char alm_msg[32]; /* alarm message */
} ODBALMMSG;
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
The alarm message number (*num) is 0 or less. |
| EW_ATTRIB |
The specification of alarm type (type) is wrong. |
misc\cnc_rdalmmsg2
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdalmmsg2(unsigned short FlibHndl, short type, short *num, ODBALMMSG2 *almmsg);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type | in |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| num | in/out |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| almmsg | out |
typedef struct odbalmmsg2 {
long alm_no ; /* alarm number */
short type ; /* alarm type */
short axis ; /* axis number */
short dummy ; /* reserved */
short msg_len ; /* message length */
char alm_msg[64]; /* alarm message */
} ODBALMMSG2;
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
The alarm message number (*num) is 0 or less. |
| EW_ATTRIB |
The specification of alarm type (type) is wrong. |
misc\cnc_rdbrstrinfo
These are stored in each member of ODBBRS structure.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdbrstrinfo(unsigned short FlibHndl, ODBBRS *brstr);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| brstr | out |
typedef struct odbbrs {
long dest[MAX_AXIS]; /* destination */
long dist[MAX_AXIS]; /* distance to go */
} ODBBRS ; /* MAX_AXIS : max. controlled axes */
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The block restart option and the extended driver/library function are necessary. |
misc\cnc_rdcdrotate
These are stored in each member of ODBROT structure.
6400#2=0
:
0.00001
deg
(1/100,000)
6400#2=1
:
0.001
deg
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdcdrotate(unsigned short FlibHndl, ODBROT *cdrot);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||
| cdrot | out |
Pointer to the ODBROT structure for the data of the coordinate rotation. The ODBROT structure is as follows.
typedef struct odbrot {
short mode; /* coordinate rotation mode */
short pln_axes[2]; /* axis of plane selection */
long center[2]; /* rotation center */
long angle; /* rotation angle */
} ODBROT ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used at 15T/15TT. |
| EW_NOOPT |
The coordinate rotation option and the extended driver/library function are necessary. |
misc\cnc_rdcexesram
Reads the SRAM variable area for C language executor specified by "offset", "length". When this function accesses this area, exclusive control with the C language executor side is not done.
Therefore, it is necessary to take mediation between the application of FOCAS1/2 and the application of C language executor.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdcexesram(unsigned short FlibHndl, long offset, void *data, long *length);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| offset | in |
Specify the start address of SRAM variable area. The top of the area is indicated by '0'. |
| data | out |
Pointer to the data storage area. |
| length | in/out |
Pointer to the data length to be read. |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
The user application is not built into CNC. The C language executor library does not support this function. |
| EW_LENGTH |
The value of 0 or less was specified. |
| EW_NUMBER |
A negative value was specified. The value which exceeded the maximum value was specified. |
| EW_NOOPT |
The C language executor function and the extended driver/library function are necessary. |
misc\cnc_rdcncid
Reads the CNC ID number.
The CNC ID numbers are stored in "cncid" with unsigned binary format.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdcncid(unsigned short FlibHndl, unsigned long *cncid);
ARGUMENTS
| Name | Direction | Description | |
|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|
| cncid | out |
Pointer to unsigned long data including the CNC ID numbers.
|
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
misc\cnc_rdcommand
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdcommand(unsigned short FlibHndl, short type, short block, short *num_cmd, ODBCMD *command);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type | in |
Specify the commanded data.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| block | in |
Specify the block to be read.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| num_cmd | in/out |
Pointer to the number of commanded data to be read. Specify the number of commanded data to be read before function call, and the number of commanded data which was/were read actually is stored after the function call. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| command | out |
Specify the address of the array of ODBCMD structure including the commanded data. The number of array must be 1 for reading data one by one. The number of array must be the number of commanded data to be read (*num_cmd) for reading all data at a time. The ODBCMD structure is as follows.
typedef struct odbcmd {
char adrs ; /* command address */
char num ; /* M code number or axis number */
short flag ; /* additional information */
long cmd_val ; /* commanded data */
long dec_val ; /* decimal point of commanded data */
} ODBCMD ;
Refer to the following explanation about the ODBCMD structure. (1) Reading the modal data except G code
The readable modal data are commanded data D, E, F, H, L, M, N, O, S, T, and second auxiliary function (A, B, C, U, V, or W). Specify 1 for "num_cmd". Specify the commanded address in the following table for "type". Specify the block to be read for "block". Then modal data except G code in the objective block specified by "block" is set in the ODBCMD structure.
The following data are set in the ODBCMD structure.
Specify the number of modal data to be read for "num_cmd". Specify -1 for "type". Specify the block to be read for "block". Then all modal data except G code in the objective block specified by "block" is set in the ODBCMD structure.Specify the number in the following table for "num_cmd" in order to read all modal data. The number of modal data which were read actually is stored in "num_cmd" after the function call.
Some same M codes may be read at a time with "multiple M commands in a single block".
(2) Reading commanded data
Specify 1 for "num_cmd". Specify the commanded address in the following table for "type". Specify the block to be read for "block". Then commanded data which is commanded in the objective block specified by "block" is set in the ODBCMD structure. When no data is commanded in the objective block specified by "block", zero is set in "num_cmd".
The following data are set in the ODBCMD structure.
The commanded data is calculated by the following expression.
Commanded data = cmd_val * 10 ** (-dec_val) (Example) The following data are read when "X200.00" is commanded.
Specify the number of commanded data to be read for "num_cmd". Specify -2 for "type". Specify the block to be read for "block". Then all commanded data in the objective block specified by "block" is set in the ODBCMD structure. Specify the number in the following table for "num_cmd" in order to read all commanded data. The number of commanded data which were read actually is stored in "num_cmd" after the function call.
(3) Reading commanded data concerning axis
Specify 1 for "num_cmd". Specify axis number (200 to 223) in the following table for "type". Specify the block to be read for "block". Then commanded data concerning axis which is commanded in the objective block specified by "block" is set in the ODBCMD structure. When no axis is commanded in the objective block specified by "block", zero is set in "num_cmd".
* When MAX_AXIS=10, type=210,..,223 are not used.
The following data are set in the ODBCMD structure.
Specify the number of commanded data concerning axis to be read for "num_cmd". Specify -3 for "type". Specify the block to be read for "block". Then all commanded data concerning axis in the objective block specified by "block" is set in the ODBCMD structure. Specify the following values for "num_cmd" in order to read all commanded data concerning axis. The number of commanded data which were read actually is stored in "num_cmd" after the function call.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type | in |
Specify the commanded data.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| block | in |
Specify the block to be read.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| num_cmd | in/out |
Pointer to the number of commanded data to be read. Specify the number of commanded data to be read before function call, and the number of commanded data which was/were read actually is stored after the function call. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| command | out |
Specify the address of the array of ODBCMD structure including the commanded data. The number of array must be 1 for reading data one by one. The number of array must be the number of commanded data to be read (*num_cmd) for reading all data at a time. The ODBCMD structure is as follows.
typedef struct odbcmd {
char adrs ; /* command address */
char num ; /* M code number or axis number */
short flag ; /* additional information */
long cmd_val ; /* commanded data */
long dec_val ; /* decimal point of commanded data */
} ODBCMD ;
Refer to the following explanation about the ODBCMD structure. (1) Reading the modal data except G code
The readable modal data are commanded data D, E, F, H, L, M, N, O, S, T, and second auxiliary function (A, B, C, U, V, or W). Specify 1 for "num_cmd". Specify the commanded address in the following table for "type". Specify the block to be read for "block". Then modal data except G code in the objective block specified by "block" is set in the ODBCMD structure.
The following data are set in the ODBCMD structure.
Specify the number of modal data to be read for "num_cmd". Specify -1 for "type". Specify the block to be read for "block". Then all modal data except G code in the objective block specified by "block" is set in the ODBCMD structure.Specify the number in the following table for "num_cmd" in order to read all modal data. The number of modal data which were read actually is stored in "num_cmd" after the function call.
Some same M codes may be read at a time with "multiple M commands in a single block".
(2) Reading commanded data
Specify 1 for "num_cmd". Specify the commanded address in the following table for "type". Specify the block to be read for "block". Then commanded data which is commanded in the objective block specified by "block" is set in the ODBCMD structure. When no data is commanded in the objective block specified by "block", zero is set in "num_cmd".
The following data are set in the ODBCMD structure.
The commanded data is calculated by the following expression.
Commanded data = cmd_val * 10 ** (-dec_val) (Example) The following data are read when "X200.00" is commanded.
Specify the number of commanded data to be read for "num_cmd". Specify -2 for "type". Specify the block to be read for "block". Then all commanded data in the objective block specified by "block" is set in the ODBCMD structure. Specify the number in the following table for "num_cmd" in order to read all commanded data. The number of commanded data which were read actually is stored in "num_cmd" after the function call.
(3) Reading commanded data concerning axis
Specify 1 for "num_cmd". Specify axis number (200 to 223) in the following table for "type". Specify the block to be read for "block". Then commanded data concerning axis which is commanded in the objective block specified by "block" is set in the ODBCMD structure. When no axis is commanded in the objective block specified by "block", zero is set in "num_cmd".
The following data are set in the ODBCMD structure.
Specify the number of commanded data concerning axis to be read for "num_cmd". Specify -3 for "type". Specify the block to be read for "block". Then all commanded data concerning axis in the objective block specified by "block" is set in the ODBCMD structure. Specify the following values for "num_cmd" in order to read all commanded data concerning axis. The number of commanded data which were read actually is stored in "num_cmd" after the function call.
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
The number of G code data to be read (num_cmd) is wrong. |
| EW_NUMBER |
The specification of commanded data (type) is wrong. |
| EW_ATTRIB |
The specification of block (block) is wrong. |
misc\cnc_rdcoordnum
Reads the number of the additional workpiece coordinate systems of the workpiece coordinate systems.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdcoordnum(unsigned short FlibHndl, short *coordnum);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| coordnum | out |
Specify the pointer to data which stores the additional workpiece coordinate systems number. When the additional work coordinate systems is not specified, the "0" is acquired. |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
| EW_NOOPT |
The addition of workpiece coordinate system 48-pairs option or the "addition of workpiece coordinate system 300-pairs option, and the extended driver/library function are necessary. |
misc\cnc_rddiag_ext
PROTOTYPE
FWLIBAPI short WINAPI cnc_rddiag_ext(unsigned short FlibHndl, long *prm_no, short num, IODBPRM *param);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| prm_no | in |
Specify the pointer to the array of the diagnosis data numbers. See the "MAINTENANCE MANUAL" of CNC about available diagnosis number. It can be got by cnc_rddiagnum function and cnc_rddiaginfo function. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| num | in |
Specify the number of the diagnosis data to be read. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| param | out |
Specify the pointer to the array of IODBPRM structure to store the diagnosis data. The number of array must be equal to "num". The IODBPRM structure is as follows.
typedef struct iodbprm {
long datano; /* diagnosis data number */
short type; /* type information */
short axis; /* axis information */
short info; /* attribute */
short unit; /* unit */
struct {
long prm_val; /* diagnosis data value */
long dec_val; /* place of decimal point */
} data[32];
} IODBPRM;
bit 1 |
: |
spindle data |
bit 2,..,15 |
: |
(reserve) |
bit 1,..,15 |
: |
(reserve) |
bit 2,..,15 |
: |
(reserve) |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| prm_no | in |
Specify the pointer to the array of the diagnosis data numbers. See the "MAINTENANCE MANUAL" of CNC about available diagnosis number. It can be got by cnc_rddiagnum function and cnc_rddiaginfo function. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| num | in |
Specify the number of the diagnosis data to be read. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| param | out |
Specify the pointer to the array of IODBPRM structure to store the diagnosis data. The number of array must be equal to "num". The IODBPRM structure is as follows.
typedef struct iodbprm {
long datano; /* diagnosis data number */
short type; /* type information */
short axis; /* axis information */
short info; /* attribute */
short unit; /* unit */
struct {
long prm_val; /* diagnosis data value */
long dec_val; /* place of decimal point */
} data[32];
} IODBPRM;
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
The number of diagnosis data (num) is 0 or less. |
misc\cnc_rddiaginfo
PROTOTYPE
FWLIBAPI short WINAPI cnc_rddiaginfo(unsigned short FlibHndl, short s_number, unsigned short read_no, ODBDIAGIF *diagif);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| s_number | in |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| read_no | in |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| diagif | out |
Pointer to the ODBDIAGIF structure including the diagnosis data information. The ODBDIAGIF structure is as follows.
typedef struct odbdiagif {
unsigned short info_no ;
/* number of diagnosis data information */
short prev_no ; /* previous diagnosis data number */
short next_no ; /* next diagnosis data number */
struct {
short diag_no ; /* diagnosis data number */
short diag_type ; /* attribute of diagnosis data */
} info[N] ; /* N is number of diagnosis data information */
} ODBDIAGIF ;
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| s_number | in |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| read_no | in |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| diagif | out |
Pointer to the ODBDIAGIF structure including the diagnosis data information. The ODBDIAGIF structure is as follows.
typedef struct odbdiagif {
unsigned short info_no ;
/* number of diagnosis data information */
short prev_no ; /* previous diagnosis data number */
short next_no ; /* next diagnosis data number */
struct {
short diag_no ; /* diagnosis data number */
short diag_type ; /* attribute of diagnosis data */
} info[N] ; /* N is number of diagnosis data information */
} ODBDIAGIF ;
|
ERRORS
| Code | Description |
|---|---|
| EW_NUMBER |
Start diagnosis data number (s_number) is wrong. |
| EW_NOOPT |
The extended driver/library function is necessary. |
misc\cnc_rddiagnum
PROTOTYPE
FWLIBAPI short WINAPI cnc_rddiagnum(unsigned short FlibHndl, ODBDIAGNUM *diagnum);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| diagnum | out |
Pointer to the ODBDIAGNUM structure including the minimum, maximum, total number of the diagnosis data. The ODBDIAGNUM structure is as follows.
typedef struct odbdiagnum {
unsigned short diag_min ;
/* mininum number of diagnosis data */
unsigned short diag_max ;
/* maximum number of diagnosis data */
unsigned short total_no ;
/* total number of diagnosis data */
} ODBDIAGNUM ;
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The extended driver/library function is necessary. |
misc\cnc_rdetherinfo
Reads the Ethernet board inforamtion in CNC.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdetherinfo(unsigned short FlibHndl, short *type, short *device);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||
| type | out |
Specify the pointer to the variable by which the communication type of the Ethernet board is stored.
|
|||||||||||||||||||||
| device | out |
Specify the pointer to the variable by which the kind of the storage device of Data Server is stored.
This data is effective only at "type=1,2". |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
The NC control software or the Ethernet firmware does not support this function. |
misc\cnc_rdfixcycle
Reads the mode and data of the canned cycle. These are stored in each member of ODBFIX structure.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdfixcycle(unsigned short FlibHndl, ODBFIX *fixcyc);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fixcyc | out |
Pointer to the ODBFIX structure for the data of the canned cycle. The ODBFIX structure is as follows.
typedef struct odbfix {
short mode; /* canned cycle mode */
short pln_axes[2];/* axis of plane selection */
short drl_axes; /* axis of drilling */
long i_pos; /* absolute position of Initial point*/
long r_pos; /* absolute position of R point */
long z_pos; /* absolute position of Z point */
long cmd_cnt; /* command of number of repeats */
long act_cnt; /* current number of repeats */
long cut; /* cut-in value */
long shift[2]; /* shift value */
} ODBFIX ;
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The canned cycle option and the extended driver/library function are necessary. |
misc\cnc_rdgcode
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdgcode(unsigned short FlibHndl, short type, short block, short *num_gcd, ODBGCD *g_code );
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type | in |
Specify the group of G code.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| block | in |
Specify the block to be read.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| num_gcd | in/out |
Pointer to the number of G code data to be read. Specify the number of G code data to be read before function call, and the number of G code data which was/were read actually is stored after the function call. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| g_code | out |
Specify the address of the array of ODBGCD structure including the G code data. The number of array must be 1 for reading data one by one. The number of array must be the number of G code to be read (*num_gcd) for reading all data at a time. The ODBGCD structure is as follows.
typedef struct odbgcd {
short group ; /* G code group */
short flag ; /* additional information */
char code[8] ; /* G code */
} ODBGCD ;
Refer to the following explanation about the ODBGCD structure. (1) Reading modal G code
Specify 1 for "num_gcd". Specify G code group in the following table for "type". Specify the block to be read for "block". Then G code which is selected in the objective block specified by "block" is set in the ODBGCD structure.
The following data are set in the ODBGCD structure.
For example, the following result is gotten by calling this function during executing N100's block of the next machining program. N090 G18 ; N100 G01 Z100. ; N110 G17 G02 X10. Y-20. R12. ;
Specify the number of G code to be read for "num_gcd". Specify -1 for "type". Specify the block to be read for "block". Then G code which is selected in the objective block specified by "block" is set in the ODBGCD structure. Specify the maximun group number for "num_gcd" in order to read all groups of G code. The number of G code which were read actually is stored in "num_gcd" after the function call. (2) Reading one shot G code
Specify 1 for "num_gcd". Specify G code group in the following table for "type". Specify the block to be read for "block". Then one shot G code which is commanded in the objective block specified by "block" is set in the ODBGCD structure. When no one shot G code is commanded in the objective block specified by "block", zero is set in "num_gcd". When no one shot G code is commanded in the objective block specified by "block", zero is set in "num_gcd".
The following data are set in the ODBGCD structure.
Specify the number of one shot G code to be read for "num_gcd". Specify -2 for "type". Specify the block to be read for "block". Then one shot G code which is commanded in the objective block specified by "block" is set in the ODBGCD structure. Specify 4 for "num_gcd" in order to read all groups of one shot G code. The number of G code which were read actually is stored in "num_gcd" after the function call. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type | in |
Specify the group of G code.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| block | in |
Specify the block to be read.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| num_gcd | in/out |
Pointer to the number of G code data to be read. Specify the number of G code data to be read before function call, and the number of G code data which was/were read actually is stored after the function call. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| g_code | out |
Specify the address of the array of ODBGCD structure including the G code data. The number of array must be 1 for reading data one by one. The number of array must be the number of G code to be read (*num_gcd) for reading all data at a time. The ODBGCD structure is as follows.
typedef struct odbgcd {
short group ; /* G code group */
short flag ; /* additional information */
char code[8] ; /* G code */
} ODBGCD ;
Refer to the following explanation about the ODBGCD structure. (1) Reading modal G code
Specify 1 for "num_gcd". Specify G code group in the following table for "type". Specify the block to be read for "block". Then G code which is selected in the objective block specified by "block" is set in the ODBGCD structure.
The following data are set in the ODBGCD structure.
For example, the following result is gotten by calling this function during executing N100's block of the next machining program. N090 G18 ; N100 G01 Z100. ; N110 G17 G02 X10. Y-20. R12. ;
Specify the number of G code to be read for "num_gcd". Specify -1 for "type". Specify the block to be read for "block". Then G code which is selected in the objective block specified by "block" is set in the ODBGCD structure. Specify 21 for "num_gcd" in order to read all groups of G code. The number of G code which were read actually is stored in "num_gcd" after the function call. (2) Reading one shot G code
Specify 1 for "num_gcd". Specify G code group in the following table for "type". Specify the block to be read for "block". Then one shot G code which is commanded in the objective block specified by "block" is set in the ODBGCD structure. When no one shot G code is commanded in the objective block specified by "block", zero is set in "num_gcd". When no one shot G code is commanded in the objective block specified by "block", zero is set in "num_gcd".
The following data are set in the ODBGCD structure.
Specify the number of one shot G code to be read for "num_gcd". Specify -2 for "type". Specify the block to be read for "block". Then one shot G code which is commanded in the objective block specified by "block" is set in the ODBGCD structure. Specify 4 for "num_gcd" in order to read all groups of one shot G code. The number of G code which were read actually is stored in "num_gcd" after the function call. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
The number of G code data to be read (*num_gcd) is wrong. |
| EW_NUMBER |
The specification of G code group (type) is wrong. |
| EW_ATTRIB |
The specification of block (block) is wrong. |
misc\cnc_rdlenofs
Reads the mode and vector of the tool length compensation. These are stored in each member of ODBLOFS structure.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdlenofs(unsigned short FlibHndl, ODBLOFS *lenofs);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| lenofs | out |
Pointer to the ODBLOFS structure for the data of the tool length compensation. The ODBLOFS structure is as follows.
typedef struct odblofs {
short mode; /* offset mode */
long ofsvct[MAX_AXIS]; /* offset vector */
} ODBLOFS ; /* MAX_AXIS : max. controlled axes */
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used at 15T/15TT. |
| EW_NOOPT |
The extended driver/library function is necessary. |
misc\cnc_rdmdlconfig
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdmdlconfig(unsigned short FlibHndl, ODBMDLC *mdlconfig);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| mdlconfig | out |
Pointer to the ODBMDLC structure for the module configuration of CNC system.The ODBMDLC structure is as follows. - The ODBMDLC structure for Series 16/18 is as follows.
typedef struct odbmdlc {
short from; /* Capacity of FROM module */
short dram; /* Capacity of DRAM module */
short sram; /* Capacity of additional SRAM module */
short pmc; /* Type of PMC module */
short crtc; /* Type of CRTC module */
short servo12; /* Existence of servo module(axis1,2) */
short servo34; /* Existence of servo module(axis3,4) */
short servo56; /* Existence of servo module(axis5,6) */
short servo78; /* (reserve) */
short sic; /* Existence of SIC */
short pos_lsi; /* Existence of POSITION LSI */
short hi_aio; /* Existence of high-speed skip & analog I/O */
short reserve1[12]; /* (reserve) */
/* Above items depend on each path. */
/* Following items are independent of each path. */
short drmmrc; /* Capacity of Extended DRAM for management software(PMC-SC) */
short drmarc; /* Capacity of DRAM for application(PMC-SC) */
short pmcmrc; /* Type of PMC module(PMC-SC) */
short dmaarc; /* Existence of additional board for DMA(PMC-SC) */
short iopt; /* Number of DI/DO points(I/O card) */
short hdiio; /* Existence of LSI for high-speed skip(I/O card) */
short gm2gr1; /* Existence of graphic engine 2 */
short crtgr2; /* Type of CRTC module(OPT-1) */
short gm1gr2; /* Existence of graphic module1(OPT-1) */
short gm2gr2; /* Existence of graphic module2(OPT-1) */
short cmmrb; /* Existence of communication module(OPT-1) */
short sv5axs; /* Existence of servo module(axis5,6)(axis card) */
short sv7axs; /* Existence of servo module(axis7,8)(axis card) */
short sicaxs; /* Existence of SIC(axis card) */
short posaxs; /* Existence of POSITION LSI(axis card) */
short hamaxs; /* Existence of high-speed skip & analog I/O(axis card) */
short romr64; /* Capacity of system EPROM module(64bitRISC) */
short srmr64; /* Capacity of SRAM module(64bitRISC) */
short dr1r64; /* Capacity of DRAM module1(64bitRISC) */
short dr2r64; /* Capacity of DRAM module2(64bitRISC) */
short iopio2; /* Number of DI/DO points(I/O card#2) */
short hdiio2; /* Existence of LSI for high-speed skip(I/O card#2) */
short cmmrb2; /* Existence of communication module(OPT-1#2) */
short romfap; /* Existence of system EPROM module(CAP2) */
short srmfap; /* Capacity of SRAM module(CAP2) */
short drmfap; /* Capacity of DRAM module(CAP2) */
short drmare; /* Capacity of DRAM for application(PMC-SE) */
short pmcmre; /* Type of PMC module(PMC-SE) */
short dmaare; /* Existence of additional board for DMA(PMC-SE) */
short frmbgg; /* Capacity of FROM module(BG-GRPH) */
short drmbgg; /* Capacity of DRAM module(BG-GRPH) */
short asrbgg; /* Capacity of additional SRAM module(BG-GRPH) */
short edtpsc; /* Version of module(PMC-SB5/SB6) */
short slcpsc; /* Existence of SLC(PMC-SB5/SB6) */
short reserve2[34]; /* (reserve) */
} ODBMDLC ;
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The extended driver/library function is necessary. |
misc\cnc_rdmdlconfig2
Reads the module configuration of CNC system.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdmdlconfig2(unsigned short FlibHndl, char *data);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| data | out |
Pointer to the character array for the module configuration of CNC system. The 128 bytes array is necessary to store them, and if its size is less than 128 bytes, the behavior of this function is not guaranteed. Description of data as follows.
As for description of each ID, see "Maintenance Manual" of the each CNC. If the value of ID is -1, it means that module does not exist.
|
ERRORS
| Code | Description |
|---|
misc\cnc_rdmirimage
Reads the mode of the programmable mirror image and the absolute position of center of mirror image. These are stored in each member of ODBMIR structure.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdmirimage(unsigned short FlibHndl, ODBMIR *mirimg);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||
| mirimg | out |
Pointer to the ODBMIR structure for the data of the programmable mirror image. The ODBMIR structure is as follows.
typedef struct odbmir {
short mode; /* mirror image mode */
long mir_flag; /* flag of mirror axis */
long mir_pos[MAX_AXIS]; /* absolute pos. of center */
} ODBMIR ; /* MAX_AXIS : max.controlled axes */
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used at 15TT. |
| EW_NOOPT |
The programmable mirror image option and the extended driver/library function are necessary. |
misc\cnc_rdopmsg
Reads the contents of the operator's message in CNC. The operator's message is stored in "data" of "OPMSG".
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdopmsg(unsigned short FlibHndl, short type, short length, OPMSG *opmsg);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||
| type | in |
Specify the kind of operator's message.
|
|||||||||||||||||||||||||||||||||||||||||||||
| length | in |
Specify the length of the data block(size of OPMSG structure) single message (1st - 4th message)
macro message
all messages
single message(1st - 4th message)
all messages
|
|||||||||||||||||||||||||||||||||||||||||||||
| opmsg | out |
Pointer to the OPMSG structure including the operator's message.
typedef struct msg {
short datano ; /* Number of operator's message */
short type ; /* Kind of operator's message */
short char_num ; /* Message length */
char data[MSG_SIZE] ; /* Operator's message strings */
} OPMSG ; /* MSG_SIZE : Message length */
|
|||||||||||||||||||||||||||||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||
| type | in |
Specify the kind of operator's message.
|
|||||||||||||||||||||||||||||||||||||||||||||
| length | in |
Specify the length of the data block(size of OPMSG structure)
|
|||||||||||||||||||||||||||||||||||||||||||||
| opmsg | out |
Pointer to the OPMSG structure including the operator's message.
typedef struct msg {
short datano ; /* Number of operator's message */
short type ; /* Kind of operator's message */
short char_num ; /* Message length */
char data[MSG_SIZE] ; /* Operator's message strings */
} OPMSG ; /* MSG_SIZE : Message length */
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of OPMSG structure(length) is wrong. |
| EW_ATTRIB |
The specification of the kind of operator's message (type) is wrong. |
| EW_NOOPT |
Set necessary CNC option. |
| EW_PARAM |
|
misc\cnc_rdopmsg2
Reads the contents of the operator's message in CNC. The operator's message is stored in "data" of "OPMSG2". This function can be used in case of four external operator messages on Series 16/18/21, 16i/18i/21i, 0i, 30i and PMi-A.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdopmsg2(unsigned short FlibHndl,short type,short length,OPMSG2 *opmsg);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||
| type | in |
Specify the kind of operator's message.
|
||||||||||||||||||||||||||||||||||||
| length | in |
Specify the length of the data block(size of OPMSG2 structure) single message(1st - 4th message)
all messages
|
||||||||||||||||||||||||||||||||||||
| opmsg | out |
Pointer to the OPMSG2 structure including the operator's message. The OPMSG2 structure is as follows.
typedef struct opmsg2 {
short datano ; /* Number of operator's message */
short type ; /* Kind of operator's message */
short char_num ; /* Message length */
char data[MSG_SIZE] ; /* Operator's message strings */
} OPMSG2 ; /* MSG_SIZE : Message length */
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of OPMSG2 structure(length) is wrong. |
| EW_ATTRIB |
The specification of the kind of operator's message(type) is wrong. |
| EW_NOOPT |
Set necessary CNC option. |
| EW_PARAM |
|
misc\cnc_rdopmsg3
Reads the contents of the operator's message in CNC.
The operator's message is stored in "data" of "opmsg".
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdopmsg3(unsigned short FlibHndl,short type, short *number, OPMSG3 *opmsg);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||
| type | in |
In case of four operator's messages with the Series 30i, 0i-D/F and PMi-A, if the values 5-16 are set, the error occurs. And, if four is specified for NC in which the macro message reading function is not provided, the error occurs. |
|||||||||||||||||||||||||||||||||
| number | in/out |
This function returns the number of message, which was read actually. Please specify "1" for type=0-4(type=0-16 30i, 0i-D/F, PMi-A). And when the type is "-1", specify "5" in case of 4 operator's messages and specify "17" in case of 16 operator's messages (30i, 0i-D/F, PMi-A only). |
|||||||||||||||||||||||||||||||||
| opmsg | out |
Pointer to the OPMSG3 structure including the operator's message. The OPMSG3 structure is as follows.
typedef struct opmsg3 {
short datano ; /* Number of operator's message */
short type ; /* Kind of operator's message */
short char_num ; /* Message length */
char data[MSG_SIZE] ; /* Operator's message strings */
} OPMSG3; /* MSG_SIZE : Message length */
|
|||||||||||||||||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||
| type | in |
|
|||||||||||||||||||||||||||||||||
| number | in/out |
This function returns the number of message which was read actually. Please specify "1" for type=0-16. And when the type is "-1", specify "5" in case of 4 operator's messages and specify "17" in case of 16 operator's messages. |
|||||||||||||||||||||||||||||||||
| opmsg | out |
Pointer to the OPMSG3 structure including the operator's message. The OPMSG3 structure is as follows.
typedef struct opmsg3 {
short datano ; /* Number of operator's message */
short type ; /* Kind of operator's message */
short char_num ; /* Message length */
char data[MSG_SIZE] ; /* Operator's message strings */
} OPMSG3; /* MSG_SIZE : Message length */
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
|
| EW_ATTRIB |
The specification of the kind of operator's message(type) is wrong. |
| EW_NOOPT |
Set necessary CNC option. |
misc\cnc_rdopnlgnrl
Reads the general output signal image of software operator's panel.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdopnlgnrl(unsigned short FlibHndl, short slct_data, IODBGNRL *opnlgnrl);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||
| slct_data | in |
Specify the data selection flag.
|
||||||||||||||||||||||||
| opnlgnrl | out |
Pointer to the IODBGNRL structure including the general output signal image of software operator's panel. The IODBGNRL structure is as follows.
typedef struct iodbgnrl {
short datano; /* Not used */
short type; /* Data select flag */
char sgnal; /* General-purpose signal 1 to 8 */
} IODBGNRL ;
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The software operator's panel general SW function and the extended driver/library function are necessary. |
misc\cnc_rdopnlgsname
Reads the general signal name of software operator's panel.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdopnlgsname(unsigned short FlibHndl, short slct_data, IODBRDNA *brdna);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||
| slct_data | in |
Specify the data selection flag.
|
||||||||||||||||||||||||
| brdna | out |
Pointer to the IODBRDNA structure including the general signal name of software operator's panel. The IODBRDNA structure is as follows.
typedef struct iodbrdna {
short datano; /* Not used */
short type; /* Data select flag */
char sgnl1_name[9]; /* General signal name 1 (ASCII) */
char sgnl2_name[9]; /* General signal name 2 (ASCII) */
char sgnl3_name[9]; /* General signal name 3 (ASCII) */
char sgnl4_name[9]; /* General signal name 4 (ASCII) */
char sgnl5_name[9]; /* General signal name 5 (ASCII) */
char sgnl6_name[9]; /* General signal name 6 (ASCII) */
char sgnl7_name[9]; /* General signal name 7 (ASCII) */
char sgnl8_name[9]; /* General signal name 8 (ASCII) */
} IODBRDNA ;
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The extended driver/library function is necessary. |
misc\cnc_rdopnlsgnl
Reads the output signal image of software operator's panel.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdopnlsgnl(unsigned short FlibHndl, short slct_data, IODBSGNL *sgnl);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| slct_data | in |
Specify the data select flag.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sgnl | out |
Pointer to the IODBSGNL structure including the output signal image of software operator's panel. The IODBSGNL structure is as follows.
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The software operator's panel function and the extended driver/library function are necessary. |
misc\cnc_rdpm_cncitem
Reads the item name relating the cnc specified by the item index.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdpm_cncitem(unsigned short FlibHndl, short start_num, short* data_num, char (*name)[62]);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| start_num | in |
Specify the starting item index to be read. (1..10) |
| data_num | in/out |
Specify the pointer for the number of items to be read. |
| name[62] | out |
Specify the pointer of the array of name strings (each 62 characters). |
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
The number of items to be read(*data_num) is 0. |
| EW_NUMBER |
The starting item index to be read(start_num) is invalid. |
misc\cnc_rdpm_item
The acquired data is as follows.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdpm_item(unsigned short FlibHndl, short start_num, short* data_num, IODBPMAINTE* item);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||
| start_num | in |
|
|||||||||||||||
| data_num | in/out |
This function returns the item number that is actually read. |
|||||||||||||||
| item | out |
Specify the pointer to the array of IODBPMAINTE structure.
typedef struct tagIODBPMAINTE {
char name[62]; /* Name string */
long type; /* Life count type */
long total; /* Life time (unit:minute) */
long remain; /* Life remained time */
long stat; /* Life count state */
} IODBPMAINTE;
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
The number of items to be read(*data_num) is 0. |
| EW_NUMBER |
The starting item index to be read(start_num) is invalid. |
misc\cnc_rdpm_mcnitem
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdpm_mcnitem(unsigned short FlibHndl, short start_num, short* data_num, char (*name)[62]);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| start_num | in |
Specify the starting item index to be read. (1..10) |
| data_num | in/out |
This function returns the item number that is actually read. |
| name[62] | in/out |
Specify the pointer of the array of name strings (each 62 characters). |
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
The number of items to be read(*data_num) is 0. |
| EW_NUMBER |
The starting item index to be read(start_num) is invalid. |
misc\cnc_rdposofs
These are stored in each member of ODBPOFS structure.
The places of decimal points can be got by cnc_getfigure function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdposofs(unsigned short FlibHndl, ODBPOFS *posofs);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| posofs | out |
Pointer to the ODBPOFS structure for the data of the tool position compensation. The ODBPOFS structure is as follows.
typedef struct odbpofs {
short mode; /* mode */
long ofsvct[MAX_AXIS]; /* offset vector */
} ODBPOFS ; /* MAX_AXIS : max. controlled axes */
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used at 15M/15T. |
| EW_NOOPT |
The extended driver/library function is necessary. |
misc\cnc_rdprstrinfo
Reads the program restart information. The program restart information is stored in each member of "ODBPRS".
In case of Series 16/18, 16i/18i/21i, 0i, 30i, B code read count and value are not used except M series.
In case of Series 15, the program restart position and remaining travel distance are valid when both NC parameter 2204#1 and 7613#0 are on(=1).
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdprstrinfo(unsigned short FlibHndl, ODBPRS *prstr);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| prstr | out |
Pointer to the ODBPRS structure including the program restart information. The ODBPRS structure is as follows.
typedef struct odbprs {
short datano; /* Not used */
short type; /* Not used */
short data_info[5]; /* Data setting information */
long rstr_bc; /* Block number */
long rstr_m[35]; /* M code value */
long rstr_t[2]; /* T code value */
long rstr_s; /* S code value */
long rstr_b; /* B code value */
long dest[MAX_AXIS]; /* Program restart position */
long dist[MAX_AXIS]; /* Program restart remaining
travel distance */
} ODBPRS ; /* MAX_AXIS : max. controlled axes. */
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The program restart function and the extended driver/library function is necessary. |
misc\cnc_rdradofs
Reads the mode and vector of the cutter compensation(tool nose radius compensation).
These are stored in each member of ODBROFS structure.
The places of decimal points can be got by cnc_getfigure function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdradofs(unsigned short FlibHndl, ODBROFS *radofs);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||
| radofs | out |
Pointer to the ODBROFS structure for the data of the cutter compensation(tool nose radius compensation). The ODBROFS structure is as follows.
typedef struct odbrofs {
short mode; /* offset mode */
short pln_axes[2]; /* axis of plane selection */
long ofsvct[2]; /* offset vector */
} ODBROFS ;
|
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_NOOPT |
|
misc\cnc_rdrepeatval
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdrepeatval(unsigned short FlibHndl, long *rep_val);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| rep_val | out |
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function is not supported by CNC. |
| EW_NOOPT |
|
misc\cnc_rdrepeatval_ext
The total repetition number and the remainder counter are acquired.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdrepeatval_ext(unsigned short FlibHndl, long *remain, long *total);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| remain | out |
|
| total | out |
Specify the pointer to the variable to store the total repetition number which is acquired. |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function is not supported by CNC. |
| EW_NOOPT |
|
misc\cnc_rdscaling
Reads the mode and data of the scaling.
These are stored in each member of ODBSCL structure.
The places of decimal points can be got by cnc_getfigure function.
The unit of magnification follows CNC parameter 6400#1.
6400#1=0
:
0.00001
times (1/100,000)
6400#1=1
:
0.001
times
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdscaling(unsigned short FlibHndl, ODBSCL *scale);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| scale | out |
Pointer to the ODBSCL structure for the data of the scaling. The ODBSCL structure is as follows.
typedef struct odbscl {
short mode; /* scaling mode */
long center[MAX_AXIS]; /* center of scaling */
long magnif[MAX_AXIS]; /* magnification of scaling */
} ODBSCL ; /* MAX_AXIS : max.controlled axes */
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used at 15T/15TT. |
| EW_NOOPT |
The scaling option and the extended driver/library function are necessary. |
misc\cnc_rdsyshard
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdsyshard(unsigned short FlibHndl, short hard_num, short *read_num, ODBSYSH *syshard);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| hard_num | in |
Specify the hard_num=1 at first time. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| read_num | in |
Pointer to the number of hardware informations to be read. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| syshard | out |
Pointer to the ODBSYSH structure for the data of the hardware configuration of CNC.
typedef struct odbsysh {
unsigned long id1 ; /* ID-1(ID) */
unsigned long id2 ; /* ID-2(additional information) */
short group_id ; /* group ID */
short hard_id ; /* hardware ID */
short hard_num ; /* hardware number */
short slot_no ; /* slot number */
short id1_format ; /* display format for ID-1 */
short id2_format ; /* display format for ID-2 */
} ODBSYSH ;
/**** Example of data ****************************************************** * group_id/hard_id/ id1 /id1_format/ id2 /id2_format/slot_no/hard_num * * * * 0100H 0100H 00010003 7 0 0 1 * * 0100H 0101H 00060004 7 800C1104 6 0 2 * * 0100H 0110H 0000C103 5 0 0 3 * * * * 0200H 0200H 00011007 7 0 1 4 * * * * 0200H 0220H 00041007 7 0 2 5 * * * * 0600H 0602H 00000005 2 0 0 6 * ****************************************************************************/ /* Example of display************************* * 1.HARDWARE CONFIGURATION * * NAME ID-1 ID-2 SLOT * * +-------------+----------+--------+----+ * * MAIN BOARD * * MAIN BOARD 00301 00 0 * * CPU CARD 00406 00 0 800C1104 * * FROM/SRAM C1/03 * * * * OPTION BOARD * * FAST ETHER 00701 10 0 1 * * PROFI(M) 00704 10 0 2 * * * * DISPLAY * * DISP ID 0101 * *********************************************/ |
ERRORS
| Code | Description |
|---|---|
| EW_DATA |
|
misc\cnc_rdsyssoft
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdsyssoft(unsigned short FlibHndl, ODBSYSS *syssoft);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| syssoft | out |
Pointer to the ODBSYSS structure for the data of the series/version of CNC system software.
typedef struct odbsyss {
char slot_no_p[16]; /* Physical slot number */
char slot_no_l[16]; /* Logical slot number */
short module_id[16]; /* Module ID */
short soft_id[16]; /* Software ID */
char soft_series[16][5]; /* Software series with CPU */
char soft_version[16][5]; /* Software version with CPU */
short soft_inst; /* soft. installation status */
char boot_ser[5]; /* Series of boot software */
char boot_ver[5]; /* Version of boot software */
char servo_ser[5]; /* Series of servo software */
char servo_ver[5]; /* Version of servo software */
char pmc_ser[5]; /* Series of PMC management soft. */
char pmc_ver[5]; /* Version of PMC management soft.*/
char ladder_ser[5]; /* Series of ladder software */
char ladder_ver[5]; /* Version of ladder software */
char mcrlib_ser[5]; /* Series of macro library */
char mcrlib_ver[5]; /* Version of macro library */
char mcrapl_ser[5]; /* Series of macro application */
char mcrapl_ver[5]; /* Version of macro application */
char spl1_ser[5]; /* Series of spindle soft.(1st) */
char spl1_ver[5]; /* Version of spindle soft.(1st) */
char spl2_ser[5]; /* Series of spindle soft.(2nd) */
char spl2_ver[5]; /* Version of spindle soft.(2nd) */
char spl3_ser[5]; /* Series of spindle soft.(3rd) */
char spl3_ver[5]; /* Version of spindle soft.(3rd) */
char c_exelib_ser[5]; /* Series of C-executer library */
char c_exelib_ver[5]; /* Version of C-executer library */
char c_exeapl_ser[5]; /* Series of C-exe. application */
char c_exeapl_ver[5]; /* Version of C-exe. application */
char int_vga_ser[5]; /* Series of VGA soft.(internal) */
char int_vga_ver[5]; /* Version of VGA soft.(internal) */
char out_vga_ser[5]; /* Series of VGA soft.(external) */
char out_vga_ver[5]; /* Version of VGA soft.(external) */
char pmm_ser[5]; /* Series of power motion manager software */
char pmm_ver[5]; /* Version of power motion manager software */
char pmc_mng_ser[5]; /* Series of PMC management software */
char pmc_mng_ver[5]; /* Version of PMC management software */
char pmc_shin_ser[5]; /* Series of PMC management software (internal SH) */
char pmc_shin_ver[5]; /* Version of PMC management software (internal SH) */
char pmc_shout_ser[5]; /* Series of PMC management software (external SH) */
char pmc_shout_ver[5]; /* Version of PMC management software (external SH) */
char pmc_c_ser[5]; /* Series of PMC management software (C language) */
char pmc_c_ver[5]; /* Version of PMC management software (C language) */
char pmc_edit_ser[5]; /* Series of PMC management software (edit card) */
char pmc_edit_ver[5]; /* Version of PMC management software (edit card) */
char lddr_mng_ser[5]; /* Series of ladder software */
char lddr_mng_ver[5]; /* Version of ladder software */
char lddr_apl_ser[5]; /* Series of ladder software (C application) */
char lddr_apl_ver[5]; /* Version of ladder software (C application) */
char spl4_ser[5]; /* Series of spindle soft.(4th) */
char spl4_ver[5]; /* Version of spindle soft.(4th) */
char mcr2_ser[5]; /* Series of 2nd macro-executer */
char mcr2_ver[5]; /* Version of 2nd macro-executer */
char mcr3_ser[5]; /* Series of 3rd macro-executer */
char mcr3_ver[5]; /* Version of 3rd macro-executer */
char eth_boot_ser[5]; /* Series of boot software of Ethernet Board */
char eth_boot_ver[5]; /* Version of boot software of Ethernet Board */
char reserve[8][5]; /* (reserve) */
} ODBSYSS ;
* Following items are only available for Series 15i, Series 16i/18i/21i, 0i, and Power Mate i. |
ERRORS
| Code | Description |
|---|
misc\cnc_rdsyssoft2
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdsyssoft2(unsigned short FlibHndl, ODBSYSS2 *syssoft2);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| syssoft2 | out |
Pointer to the ODBSYSS2 structure for the data of the series/version of CNC system software. The ODBSYSS2 structure is as follows.
typedef struct odbsyss2 {
char slot_no_p[16]; /* Physical slot number */
char slot_no_l[16]; /* Logical slot number */
short module_id[16]; /* Module ID */
short soft_id[16]; /* Software ID */
char soft_series[16][5]; /* Software series with CPU */
char soft_version[16][5]; /* Software version with CPU */
short soft_inst; /* Software installation status */
char boot_ser[5]; /* Series of boot software */
char boot_ver[5]; /* Version of boot software */
char servo_ser[5]; /* Series of servo software */
char servo_ver[5]; /* Version of servo software */
char pmc_ser[5]; /* Series of PMC management software */
char pmc_ver[5]; /* Version of PMC management software */
char ladder_ser[5]; /* Series of ladder software */
char ladder_ver[5]; /* Version of ladder software */
char mcrlib_ser[5]; /* Series of macro library */
char mcrlib_ver[5]; /* Version of macro library */
char mcrapl_ser[5]; /* Series of macro application */
char mcrapl_ver[5]; /* Version of macro application */
char spl1_ser[5]; /* Series of spindle software (1st) */
char spl1_ver[5]; /* Version of spindle software (1st) */
char spl2_ser[5]; /* Series of spindle software (2nd) */
char spl2_ver[5]; /* Version of spindle software (2nd) */
char spl3_ser[5]; /* Series of spindle software (3rd) */
char spl3_ver[5]; /* Version of spindle software (3rd) */
char c_exelib_ser[5]; /* Series of C-executer library */
char c_exelib_ver[5]; /* Version of C-executer library */
char c_exeapl_ser[5]; /* Series of C-exe. application */
char c_exeapl_ver[5]; /* Version of C-exe. application */
char int_vga_ser[5]; /* Series of VGA software (internal) */
char int_vga_ver[5]; /* Version of VGA software (internal) */
char out_vga_ser[5]; /* Series of VGA software (external) */
char out_vga_ver[5]; /* Version of VGA software (external) */
char pmm_ser[5]; /* Series of power motion manager software */
char pmm_ver[5]; /* Version of power motion manager software */
char pmc_mng_ser[5]; /* Series of PMC management software */
char pmc_mng_ver[5]; /* Version of PMC management software */
char pmc_shin_ser[5]; /* Series of PMC management software (internal SH) */
char pmc_shin_ver[5]; /* Version of PMC management software (internal SH) */
char pmc_shout_ser[5]; /* Series of PMC management software (external SH) */
char pmc_shout_ver[5]; /* Version of PMC management software (external SH) */
char pmc_c_ser[5]; /* Series of PMC management software (C language) */
char pmc_c_ver[5]; /* Version of PMC management software (C language) */
char pmc_edit_ser[5]; /* Series of PMC management software (edit card) */
char pmc_edit_ver[5]; /* Version of PMC management software (edit card) */
char lddr_mng_ser[5]; /* Series of ladder software */
char lddr_mng_ver[5]; /* Version of ladder software */
char lddr_apl_ser[5]; /* Series of ladder software (C application) */
char lddr_apl_ver[5]; /* Version of ladder software (C application) */
char spl4_ser[5]; /* Series of spindle software (4th) */
char spl4_ver[5]; /* Version of spindle software (4th) */
char mcr2_ser[5]; /* Series of 2nd macro-executer */
char mcr2_ver[5]; /* Version of 2nd macro-executer */
char mcr3_ser[5]; /* Series of 3rd macro-executer */
char mcr3_ver[5]; /* Version of 3rd macro-executer */
char eth_boot_ser[5]; /* Series of boot software of Ethernet Board */
char eth_boot_ver[5]; /* Version of boot software of Ethernet Board */
char reserve[8][5]; /* (reserve) */
char embEthe_ser[5]; /* Series of embedded Ethernet software */
char embEthe_ver[5]; /* Version of embedded Ethernet software */
char reserve2[38][5]; /* (reserve) */
} ODBSYSS2 ;
slot_no_p,...,reserve are the same as what cnc_rdsyssoft can read. See the explanation about cnc_rdsyssoft in detail.
However, you may not read the data after "reserve" according to the series/version of CNC control software.
* Above series/version are stored in ASCII code(4 byte + 'NULL'). In case of no software, first character is 'NULL'. |
ERRORS
| Code | Description |
|---|
misc\cnc_rdsyssoft3
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdsyssoft3(unsigned short FlibHndl, short s_id, short *read_num, short *all_num, ODBSYSS3 *syssoft3);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| s_id | in |
Specify starting ID of series/version information that you want to read. This function gathers IDs from the specified one to larger ones. When you want to read all series/version information, first specify as "s_id = 0", then repeat the reading by specifying as s_id = (last acquired s_id) + 1" |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| read_num | in/out |
Specify the pointer for the number of software information to be read. This function returns the number of data that was read actually. Valid data range is 1,...,40. When no data is read, "read_num = 0" is returned. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| all_num | out |
Specify the pointer for the number of all software information. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| syssoft3 | out |
Pointer to the ODBSYSS3 structure for the data of the series/version of CNC system software. The number of array must be required so as to store the 'read_num'. The ODBSYSS3 structure is as follows.
typedef struct odbsyss3 {
short soft_id ; /* Software ID */
char soft_series[5] ; /* Software series */
char soft_edition[5] ; /* Software version */
} ODBSYSS3 ;
|
ERRORS
| Code | Description |
|---|
misc\cnc_rdtimer
Gets cutting time, cycle time, and other timer data of CNC.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdtimer(unsigned short FlibHndl, short type, IODBTIME *time);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||
| type | in |
Specify timer data to be read.
|
|||||||||||||||
| time | out |
Pointer to the IODBTIME structure including timer data of CNC. The IODBTIME structure is as follows.
typedef struct iodbtime {
long minute ; /* minutes (0 - 999999999) */
long msec ; /* milliseconds (0 - 59999) */
} IODBTIME ;
|
ERRORS
| Code | Description |
|---|---|
| EW_ATTRIB |
The specification of timer data (type) is wrong. |
misc\cnc_reset
PROTOTYPE
FWLIBAPI short WINAPI cnc_reset(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
| EW_BUSY |
CNC has been reseted. |
| EW_STOP |
|
misc\cnc_reset2
CNC is reset.
When this function is executed, reset is executed to all paths or the path selected bt CNC according to set value of parameter No.8100#0(RST) of 1st path.
Note)
:
In case of M system, if this function is executed during the background drawing when the set value of parameter No.8100#0(RST) is 1, the background drawing is not reset but the processing side is reset.
When the set value of parameter No.8100#0(RST) is 0, both of the background drawing and the processing side are reset.
PROTOTYPE
FWLIBAPI short WINAPI cnc_reset2(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function is not supported by CNC. |
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_REJECT |
Path selected by path select signal is emergency stop or reset status.(30i/31i/32i, 0i-D/F only) |
misc\cnc_rstrseqsrch
Searches the sequence number for program restart.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rstrseqsrch(unsigned short FlibHndl, long no, long rep, short no_type, short pq_type);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| no | in |
Specify the Sequence / Block number. |
||||||
| rep | in |
Specify the count. |
||||||
| no_type | in |
|
||||||
| pq_type | in |
|
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_NUMBER |
The specification of number type (no_type) is wrong. |
|||||||||
| EW_ATTRIB |
The specification of search type (pq_type) is wrong. |
|||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of OBDERR structure.
|
|||||||||
| EW_NOOPT |
The program restart function and the extended driver/library function is necessary. |
|||||||||
| EW_MODE |
- Set CNC mode to MEM, RMT(only 30i/31i/32i, 0i-D/F). - Program restart signel was OFF. (only 30i/31i/32i, 0i-D/F) |
|||||||||
| EW_REJECT |
- Program restart signel was OFF. (except 30i/31i/32i, 0i-D/F) |
misc\cnc_rstrseqsrch2
Searches the sequence number for program restart.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rstrseqsrch2(unsigned short FlibHndl, long no, long rep, short no_type, short pq_type, long prg_no);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| no | in |
Specify the Sequence / Block number. |
||||||
| rep | in |
Specify the count. |
||||||
| no_type | in |
|
||||||
| pq_type | in |
|
||||||
| prg_no | in |
|
ERRORS
| Code | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_NUMBER |
Number type (no_type) is wrong. |
||||||||||||
| EW_ATTRIB |
Search type (pq_type) is wrong. |
||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
|
||||||||||||
| EW_NOOPT |
The program restart function and the extended driver/library function is necessary. |
||||||||||||
| EW_MODE |
Set CNC mode to MEM. |
||||||||||||
| EW_REJECT |
|
misc\cnc_setpath
PROTOTYPE
FWLIBAPI short WINAPI cnc_setpath(unsigned short FlibHndl, short path_no);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||
| path_no | in |
Specify the path number.
|
|||||||||||||||||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||
| path_no | in |
Specify the path number. (0,..,10) 0 means 1st path. (=1) |
ERRORS
| Code | Description |
|---|---|
| EW_PATH |
The path number (path_no) is wrong. |
misc\cnc_settimer
Sets the date or time data to the calendar timer device of the CNC unit.
PROTOTYPE
FWLIBAPI short WINAPI cnc_settimer(unsigned short FlibHndl, IODBTIMER *buf);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||
| buf | in |
Pointer to the IODBTIMER structure including the date or time of CNC. The IODBTIMER structure is as follows.
typedef struct iodbtimer {
short type ; /* Spec. of date or time. */
short dummy ; /* Not used. */
union {
struct {
short year ; /* Year. */
short month ; /* Month. */
short date ; /* Date. */
} date ;
struct {
short hour ; /* Hour. */
short minute ;/* Minute. */
short second ;/* Second. */
} time ;
} data ;
} IODBTIMER ;
Specify one of the following values in "buf.type". (It is impossible to set both date and time simultaneously.)
Store the date value or time value in each member of "buf.data.date" or "buf.data.time" with binary format as follows.
That is, the following data can be set for CNC.
|
|||||||||||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||
| buf | in |
Pointer to the IODBTIMER structure including the date or time of CNC. The IODBTIMER structure is as follows.
typedef struct iodbtimer {
short type ; /* Spec. of date or time. */
short dummy ; /* Not used. */
union {
struct {
short year ; /* Year. */
short month ; /* Month. */
short date ; /* Date. */
} date ;
struct {
short hour ; /* Hour. */
short minute ;/* Minute. */
short second ;/* Second. */
} time ;
} data ;
} IODBTIMER ;
Specify one of the following values in "buf.type". (It is impossible to set both date and time simultaneously.)
Store the date value or time value in each member of "buf.data.date" or "buf.data.time" with binary format as follows.
This function check the validity of date format (IODBTIMER1) strictly. When you try setting "Apr. 31" or "Feb. 29 (not in a leap year)", this function returns EW_DATA. |
ERRORS
| Code | Description |
|---|---|
| EW_NUMBER |
|
| EW_DATA |
|
| EW_REJECT |
Any hardware may be out of order. |
misc\cnc_sramget
The SRAM data which was read by this function should be restored by using the Boot function.(The SRAM data cannot be restored while the system is running).
It is necessary to make the file having the file name which was acquired by cnc_getsraminfo function to restore the SRAM data by using the Boot function.
Refer to the following for the method of making the file for the S-RAM data.
The procedure of reading S-RAM data and storing the data to the file is as follows.
The size of one file is calculated from information of cnc_getsraminfo as follows.
Size of S-RAM data (sramsize)
Size of one file
=
Number of file division (dibnumber)
Ex.)
i Series(1Mbyte S-RAM)
Information acquired by cnc_getsraminfo
sramsize
=
1Mbyte(1048576byte) = 1024Kbyte
divnumber
=
2
fname[0]
=
"SRAM1_0A.FDB"
fname[1]
=
"SRAM1_0B.FDB"
Size of one file
=
1024Kbyte / 2 = 512Kbyte
Make the file whose size is 512 Kbyte in order of SRAM1_0A.FDB, SRAM1_0B.FDB.
PROTOTYPE
FWLIBAPI short WINAPI cnc_sramget(unsigned short FlibHndl, short *stat, void *data, long *length);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| stat | out |
Specify the address of the variable by which the reading state of S-RAM is stored.
Call the cnc_sramgetend function in case of stat=0. |
||||||
| data | out |
Pointer to the variable to which the reading data is stored. |
||||||
| length | in/out |
Pointer to the variable to which the data length was set. |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
| EW_LENGTH |
|
| EW_BUFFER |
Retry because the buffer is empty. |
| EW_REJECT |
|
misc\cnc_sramgetend
Indicates the termination of reading the S-RAM data from CNC.
PROTOTYPE
FWLIBAPI short WINAPI cnc_sramgetend(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
| EW_DATA |
The cnc_sramgetend function was called in the state of argument stat=1, at cnc_sramget function. |
| EW_REJECT |
|
misc\cnc_sramgetstart
Indicates the start of reading the S-RAM data from CNC.
PROTOTYPE
FWLIBAPI short WINAPI cnc_sramgetstart(unsigned short FlibHndl, char *name);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| name | in |
The name of the S-RAM data which you want to read. |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
| EW_BUSY |
cnc_sramgetstart function has been already executed. Terminate a reading process by using cnc_sramgetend function. |
| EW_DATA |
|
| EW_REJECT |
|
| EW_PASSWD |
|
misc\cnc_statinfo
PROTOTYPE
FWLIBAPI short WINAPI cnc_statinfo(unsigned short FlibHndl, ODBST *statinfo);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| statinfo | out |
typedef struct odbst {
short dummy[2]; /* Not used */
short aut; /* AUTOMATIC mode selection */
short manual; /* MANUAL mode selection */
short run; /* Status of automatic operation */
short edit; /* Status of program editing */
short motion; /* Status of axis movement,dwell */
short mstb; /* Status of M,S,T,B function */
short emergency; /* Status of emergency */
short write; /* Status of writing backupped memory */
short labelskip; /* Status of label skip */
short alarm; /* Status of alarm */
short warning; /* Status of warning */
short battery; /* Status of battery */
} ODBST ;
* In case of multi-path, there are difference of path for only Status of axis movement, dwell", and Status of M,S,T,B function". As for the other status, there is no difference.
* In case of multi-path, all status exist for each path.
typedef struct odbst {
short hdck ; /* Status of manual handle re-trace */
short tmmode ; /* T/M mode selection */
short aut ; /* AUTOMATIC/MANUAL mode selection */
short run ; /* Status of automatic operation */
short motion ; /* Status of axis movement,dwell */
short mstb ; /* Status of M,S,T,B function */
short emergency ; /* Status of emergency */
short alarm ; /* Status of alarm */
short edit ; /* Status of program editing */
} ODBST ;
typedef struct odbst {
short dummy[2] ; /* Not used */
short aut ; /* AUTOMATIC/MANUAL mode selection */
short run ; /* Status of automatic operation */
short motion ; /* Status of axis movement,dwell */
short mstb ; /* Status of M,S,T,B function */
short emergency ; /* Status of emergency */
short alarm ; /* Status of alarm */
short edit ; /* Status of program editing */
} ODBST ;
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| statinfo | out |
* In case of multi-path, all status exist for each path.
typedef struct odbst {
short hdck ; /* Status of manual handle re-trace */
short tmmode ; /* T/M mode selection */
short aut ; /* AUTOMATIC/MANUAL mode selection */
short run ; /* Status of automatic operation */
short motion ; /* Status of axis movement,dwell */
short mstb ; /* Status of M,S,T,B function */
short emergency ; /* Status of emergency */
short alarm ; /* Status of alarm */
short edit ; /* Status of program editing */
} ODBST ;
|
ERRORS
| Code | Description |
|---|
misc\cnc_statinfo2
PROTOTYPE
FWLIBAPI short WINAPI cnc_statinfo2(unsigned short FlibHndl, ODBST2 *statinfo);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| statinfo | out |
* In case of multi-path, all status exist for each path.
typedef struct odbst2 {
short hdck ; /* Status of manual handle re-trace */
short tmmode ; /* T/M mode selection */
short aut ; /* AUTOMATIC/MANUAL mode selection */
short run ; /* Status of automatic operation */
short motion ; /* Status of axis movement,dwell */
short mstb ; /* Status of M,S,T,B function */
short emergency ; /* Status of emergency */
short alarm ; /* Status of alarm */
short edit ; /* Status of program editing */
short warning; /* Status of wraning */
short o3dchk; /* Status of 3D interference mode */
short ext_opt; /* Status of option */
short restart; /* Status of restart after program editing */
} ODBST2 ;
|
ERRORS
| Code | Description |
|---|
misc\cnc_sysconfig
Reads the CNC system configuration information.
Various information is stored in each member of ODBSYSC.
This function cannot be used on Series 15i, 16i/18i/21i, 0i-B and 30i.
PROTOTYPE
FWLIBAPI short WINAPI cnc_sysconfig(unsigned short FlibHndl, ODBSYSC *sysinfo);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| syssoft | out |
Pointer to the ODBSYSC structure including the CNC configuration information.
typedef struct odbsysc {
char slot_no_p[16]; /* Physical slot number */
char slot_no_l[16]; /* Logical slot number */
short mod_id[16]; /* Module ID */
short soft_id[16]; /* Software ID */
char s_series[16][5]; /* Software series */
char s_version[16][5]; /* Software version */
char sys_id[16]; /* System ID of CNC(CNC series name)*/
char sys_ser[5]; /* System series of CNC */
char sys_ver[5]; /* System version of CNC */
char basic_ver[5]; /* Version of CNC basic software */
char opta1_ver[5]; /* Version of CNC option 1 software */
char opta2_ver[5]; /* Version of CNC option 2 software */
char opta3_ver[5]; /* Version of CNC option 3 software */
char opta4_ver[5]; /* Version of CNC option 4 software */
char sub_ver[5]; /* Version of CNC sub software */
char opts1_ver[5]; /* Version of CNC sub option 1 soft.*/
char tcopt_ver[5]; /* Version of TC option software */
char axis_ser[5]; /* Series of axis software */
char axis_ver[5]; /* Version of axis software */
char help_ser[5]; /* Series of HELP ROM */
char help_ver[5]; /* Version of HELP ROM */
char boot_ser[5]; /* Series of BOOT ROM */
char boot_ver[5]; /* Version of BOOT ROM */
char servo_ser[5]; /* Series of servo software */
char servo_ver[5]; /* Version of servo software */
char cmpl_ser[5]; /* Series of macro compiler */
char cmpl_ver[5]; /* Version of macro compiler */
char sral1_ser[5]; /* Series of 1st serial spindle */
char sral1_ver[5]; /* Version of 1st serial spindle */
char sral2_ser[5]; /* Series of 2nd serial spindle */
char sral2_ver[5]; /* Version of 2nd serial spindle */
char sral3_ser[5]; /* Series of 3rd serial spindle */
char sral3_ver[5]; /* Version of 3rd serial spindle */
char sral4_ser[5]; /* Series of 4th serial spindle */
char sral4_ver[5]; /* Version of 4th serial spindle */
short pcb_info[20]; /* Information of each board */
short pcb_note[20][16]; /* Modules built in each board */
} ODBSYSC ;
The data from 's_series' to 'sral4_ver' are stored in ASCII code, and the last data of each member is 'NULL' code.
typedef struct odbsysc {
char slot_no_p[16]; /* Physical slot number */
char slot_no_l[16]; /* Logical slot number */
short mod_id[16]; /* Module ID */
short soft_id[16]; /* Software ID */
char s_series[16][5]; /* Software series */
char s_version[16][5]; /* Software version */
char dummy[16]; /* Not used */
short m_rom; /* Main-CPU CNC software installation status */
short s_rom; /* Sub-CPU CNC software installation status */
char svo_soft[8]; /* Series and version of servo software */
char pmc_soft[6]; /* Series and version of PMC management software */
char lad_soft[6]; /* Series and version of Ladder software */
char mcr_soft[8]; /* Series and version of macro executor */
char spl1_soft[6]; /* Series and version of spindle software(1st spindle) */
char spl2_soft[6]; /* Series and version of spindle software(2nd spindle) */
short frmmin; /* Capacity of FROM module (MAIN) */
short drmmin; /* Capacity of DRAM module (MAIN) */
short srmmin; /* Capacity of additional SRAM module (MAIN) */
short pmcmin; /* Type of PMC module (MAIN) */
short crtmin; /* Type of CRTC module (MAIN) */
short sv1min; /* Existence of servo module (axis 1,2) (MAIN) */
short sv3min; /* Existence of servo module (axis 3,4) (MAIN) */
short sicmin; /* Existence of SIC (MAIN) */
short posmin; /* Existence of position LSI (MAIN) */
short drmmrc; /* Extended DRAM for management software (PMC-SC) */
short drmarc; /* Capacity of DRAM for applications (PMC-SC) */
short pmcmrc; /* Type of PMC module (PMC-SC) */
short dmaarc; /* Existence of additional board for DMA (PMC-SC) */
short iopt; /* Number of DI/DO points (I/O card) */
short hdiio; /* Existence of LSI for high-speed skip (I/O card) */
short frmsub; /* Capacity of FROM module (SUB) */
short drmsub; /* Capacity of DRAM module (SUB) */
short srmsub; /* Capacity of added SRAM module (SUB) */
short sv5sub; /* Existence of servo module (axis 5,6) (SUB) */
short sv7sub; /* Existence of servo module (axis 7,8) (SUB) */
short sicsub; /* Existence of SIC (SUB) */
short possub; /* Existence of position LSI (SUB) */
short hamsub; /* Existence of high-speed skip and analog I/O (SUB) */
short gm2gr1; /* Existence of graphic engine 2 */
short crtgr2; /* Existence of CRTC module type (OPT-1)*/
short gm1gr2; /* Existence of graphic module 1 (OPT-1)*/
short gm2gr2; /* Existence of graphic module 2 (OPT-1)*/
short cmmrb; /* Existence of communication module (OPT-1)*/
short sv5axs; /* Existence of servo module (axis 5,6) (Axis card) */
short sv7axs; /* Existence of servo module (axis 7,8) (Axis card) */
short sicaxs; /* Existence of SIC (Axis card) */
short posaxs; /* Existence of position LSI (Axis card)*/
short hanaxs; /* Existence of high-speed skip and analog I/O (Axis card)*/
short romr64; /* Capacity of the system EPROM (64bitRISC)*/
short srmr64; /* Capacity of SRAM module (64bitRISC)*/
short dr1r64; /* Capacity of DRAM module 1 (64bitRISC)*/
short dr2r64; /* Capacity of DRAM module 2 (64bitRISC)*/
short iopio2; /* Number of DI/DO points (I/O card #2) */
short hdiio2; /* Existence of LSI for high-speed skip (I/O card #2) */
short cmmrb2; /* Existence of communication module (OPT-1 #2) */
short romfap; /* Capacity of EPROM module (CAP2) */
short srmfap; /* Capacity of SRAM module (CAP2) */
short drmfap; /* Capacity of DRAM module (CAP2) */
} ODBSYSC ;
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The extended driver/library function is necessary. |
misc\cnc_sysinfo
PROTOTYPE
FWLIBAPI short WINAPI cnc_sysinfo(unsigned short FlibHndl, ODBSYS *sysinfo);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sysinfo | out |
There is difference at the structure between Series 15 and Series 15i/16/18/21/16i/18i/21i/0i/30i/31i/32i/35i/Power Mate i, PMi-A. The ODBSYS structure define type for Series 15 is as follows.
For example, the following information are gotten by execution of this function on Series 16i-M (B0F1-0001) system with 3 servo axes and without loader control.
sysinfo.addinfo = 2 sysinfo.max_axis = 8 sysinfo.cnc_type = "16" sysinfo.mt_type = " M" sysinfo.series = "B0F1" sysinfo.version = "0001" sysinfo.axes = " 3" |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sysinfo | out |
typedef struct odbsys {
short addinfo ; /* Additional information */
short max_axis ; /* Max. controlled axes */
char cnc_type[2] ;/* Kind of CNC (ASCII) */
char mt_type[2] ; /* Kind of M/T/TT (ASCII) */
char series[4] ; /* Series number (ASCII) */
char version[4] ; /* Version number (ASCII) */
char axes[2] ; /* Current controlled axes(ASCII)*/
} ODBSYS ;
sysinfo.addinfo = 2 sysinfo.max_axis = 32 sysinfo.cnc_type = "30" sysinfo.mt_type = " M" sysinfo.series = "G001" sysinfo.version = "0001" sysinfo.axes = " 3" |
ERRORS
| Code | Description |
|---|
misc\cnc_sysinfo_ex
Reads system information such as distinction of Machining(M) or Turning(T), number of path and number of the controlled axes.
Use this function to confirm compatibility of CNC's system software and PMC's software or to get the number of controllable axes before reading axis coordinate data such as absolute, machine position.
PROTOTYPE
FWLIBAPI short WINAPI cnc_sysinfo_ex(unsigned short FlibHndl, ODBSYSEX *sys);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||
| sys | out |
typedef struct odbsysex {
short max_axis; /* maximum controlled axes */
short max_spdl; /* maximum spundle number */
short max_path; /* maximum path number */
short max_mchn; /* maximum machining group number */
short ctrl_axis; /* controlled axes number */
short ctrl_srvo; /* servo axis number */
short ctrl_spdl; /* spindle number */
short ctrl_path; /* path number */
short ctrl_mchn; /* number of control machines */
short reserved[3];
struct {
short system; /* kind of system */
short group; /* kind of system group */
short attrib; /* path attribute */
short ctrl_axis; /* control axes per path */
short ctrl_srvo; /* servo axis number per path */
short ctrl_spdl; /* spindle number per path */
short mchn_no; /* machine group number */
short reserved;
} path[MAX_PATH];
} ODBSYSEX;
|
ERRORS
| Code | Description |
|---|
misc\cnc_wrcexesram
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrcexesram(unsigned short FlibHndl, long offset, void *data, long *length);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| offset | in |
Specify the start address of SRAM variable area. The top of the area is indicated by '0'. |
| data | in |
Pointer to the data storage area. |
| length | in/out |
Actual data length being write is stored after this function call. Maximum data length which can be write at a time is the size acquired in the cnc_cexesramsize function. |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
The user application is not built into CNC. The C language executor library does not support this function. |
| EW_LENGTH |
The value of 0 or less was specified. |
| EW_NUMBER |
A negative value was specified. The value which exceeded the maximum value was specified. |
| EW_NOOPT |
The C language executor function and the extended driver/library function are necessary. |
misc\cnc_wropnlgnrl
Writes the general output signal of software operator's panel.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wropnlgnrl(unsigned short FlibHndl, IODBGNRL *opnlgnrl);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||
| opnlgnrl | in |
Pointer to the IODBGNRL structure to set the general output signal of software operator's panel. The IODBGNRL structure is as follows.
typedef struct iodbgnrl {
short datano; /* Not used */
short type; /* Data select flag */
char sgnal; /* General-purpose signal 1 to 8 */
} IODBGNRL ;
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The software operator's panel general SW function and the extended driver/library function are necessary. |
misc\cnc_wropnlgsname
Writes the general signal name of software operator's panel.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wropnlgsname(unsigned short FlibHndl, IODBRDNA *brdna);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||
| brdna | in |
Pointer to the IODBRDNA structure to set the general signal name of software operator's panel. The IODBRDNA structure is as follows.
typedef struct iodbrdna {
short datano; /* Not used */
short type; /* Data select flag */
char sgnl1_name[9]; /* General signal name 1 (ASCII) */
char sgnl2_name[9]; /* General signal name 2 (ASCII) */
char sgnl3_name[9]; /* General signal name 3 (ASCII) */
char sgnl4_name[9]; /* General signal name 4 (ASCII) */
char sgnl5_name[9]; /* General signal name 5 (ASCII) */
char sgnl6_name[9]; /* General signal name 6 (ASCII) */
char sgnl7_name[9]; /* General signal name 7 (ASCII) */
char sgnl8_name[9]; /* General signal name 8 (ASCII) */
} IODBRDNA ;
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The extended driver/library function is necessary. |
misc\cnc_wropnlsgnl
Writes the output signal of software operator's panel.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wropnlsgnl(unsigned short FlibHndl, IODBSGNL *sgnl);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sgnl | in |
Pointer to the IODBSGNL structure to set the output signal of software operator's panel. The IODBSGNL structure is as follows.
|
ERRORS
| Code | Description |
|---|---|
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The item including incorrect data (the bit position in the data selection flag (type)) will be set onto the member, err_dtno of ODBERR. |
| EW_NOOPT |
The software operator's panel function and the extended driver/library function are necessary. |
misc\cnc_wrpm_item
The acquired data is as follows.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrpm_item(unsigned short FlibHndl, short start_num, short type, short data_num, IODBPMAINTE* item);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||
| start_num | in |
|
|||||||||||||||||||||
| type | in |
Specify the written data type.
|
|||||||||||||||||||||
| data_num | in |
|
|||||||||||||||||||||
| item | in |
Specify the pointer to the array of IODBPMAINTE structure.
typedef struct tagIODBPMAINTE {
char name[40]; /* Name string */
long type; /* Life count type */
long total; /* Life time (unit:minute) */
long remain; /* Life remained time */
long stat; /* Life count state */
} IODBPMAINTE;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
Program is running. (only 16i18i/21i) |
| EW_LENGTH |
The number of items to be written(data_num) is 0. |
| EW_NUMBER |
The starting item index to be written (start_num) is invalid. |
| EW_ATTRIB |
The written data type(type) is invalid. |
| EW_DATA |
In order to get more information for this return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure. 0 : Completion status other than EW_DATA 1 : Name string error 2 : Life count type error 3 : Life time data error 4 : Life remained time data error 5 : Life count state error Item index corresponding error data is acquired at err_dtno. |
| EW_REJECT |
CNC is on execution. |
misc\cnc_wrpm_mcnitem
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrpm_mcnitem(unsigned short FlibHndl, short start_num, short data_num, char (*name)[62]);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| start_num | in |
|
| data_num | in |
|
| name[62] | in |
The array of this string that is specified by data_num is required. The number of characters which can be set is up to 24 characters. Please set "NULL" character for the terminal of string. |
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
The number of items to be written(data_num) is 0. |
| EW_NUMBER |
The starting item index to be written (start_num) is invalid. |
| EW_DATA |
In order to get more information for this return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure. 0 : Completion status other than EW_DATA 1 : Name of item relating machine error Item index corresponding error data is acquired at err_dtno. |
| EW_REJECT |
CNC is on execution. |
misc\cnc_wrtimer
Sets cutting time, cycle time, and other timer data of CNC.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrtimer(unsigned short FlibHndl, short type, IODBTIME *time);
ARGUMENTS
| Name | Direction | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||
| type | in |
Specify timer data to be set.
|
||||||||||||
| time | in |
Pointer to the IODBTIME structure including timer data of CNC. The IODBTIME structure is as follows.
typedef struct iodbtime {
long minute ; /* minutes (0 - 999999999) */
long msec ; /* milliseconds (0 - 59999) */
} IODBTIME ;
|
ERRORS
| Code | Description |
|---|---|
| EW_ATTRIB |
The specification of timer data (type) is wrong. |
| EW_DATA |
Some value of member in the IODBTIME structure is wrong. |
motor\cnc_loadtorq
Reads abnormal load torque data (estimated load torque) of servo motors or spindle motors. Data is stored in ODBLOAD structure in signed binary form.
motor specifies the type of a target motor for reading.
Reads the abnormal load torque data for all axes once by specifying 'ALL_AXES' in 'axis'.
The abnormal load torque data for each axis is stored in data array of "ODBLOAD" structure.
(1)
For servo motors
In torq.data, a digitized value of a load current ("0" to "+/-7282") is stored in binary form. From this value, the load current value can be obtained by using the following formula:
Load current = torq.data × N / 7282 [Apeak]
where, N denotes the following:
Value of parameter No. 2165
N value
Smaller than 20
Value of parameter No. 2165
20 or greater
Value of parameter No. 2165/10 * 10
(The figure of the unit's place is omitted.)
(2)
For spindle motors
A value from "-32767" to "+32767" is stored. From this value, the percentage to the maximum torque can be obtained by using the following formula:
Percentage to the maximum torque = buf.data/32767×100 [%]
PROTOTYPE
FWLIBAPI short WINAPI cnc_loadtorq( unsigned short FlibHndl, short motor, short axis, short longth, ODBLOAD *torq );
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. |
||||||
| motor | in |
Motor type.
|
||||||
| axis | in |
Axis number.
|
||||||
| length | in |
Data block length. |
||||||
| torq | out |
Buffer in which abnormal load torque data is stored. The ODBLOAD structure is as follows.
typedef struct odbload {
short datano ; /* Motor type. */
short type ; /* Axis number. */
short data[N] ; /* Abnormal load torque data. */
} ODBLOAD ; /* N is the maximum number of controlled axes. */
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
The ODBLOAD size(length) is invalid. |
| EW_ATTRIB |
The axis number(axis) is invalid. |
| EW_NOOPT |
The unexpected disturbance torque detection function and the extended driver/library function are necessary. |
motor\cnc_rdctrldi
Reads "control input signal for spindle monitor".
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdctrldi(unsigned short FlibHndl,ODBSPDI *spdi);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| spdi | out |
Pointer to the ODBSPDI structure array including the control input signal for spindle monitor. The number of array must be equal to the following.
The data within the number of spindles acquired by cnc_rdnspdl function is valid.
ODBSPDI spdi[N] ; /* N : maximum spindle number */
The ODBSPDI structure is as follows.
typedef struct odbspdi {
char sgnl1 ; /* control input signal 1 */
char sgnl2 ; /* control input signal 2 */
char sgnl3 ; /* control input signal 3 */
char sgnl4 ; /* control input signal 4 */
} ODBSPDI ;
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| spdi | out |
Pointer to the ODBSPDI structure array including the control input signal for spindle monitor. The number of array must be 8. The data within the number of spindles acquired by cnc_rdnspdl function is valid.
ODBSPDI spdi[N] ; /* N : maximum spindle number */
The ODBSPDI structure is as follows.
typedef struct odbspdi {
char sgnl1 ; /* control input signal 1 */
char sgnl2 ; /* control input signal 2 */
char sgnl3 ; /* control input signal 3 */
char sgnl4 ; /* control input signal 4 */
} ODBSPDI ;
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The serial spindle function(only Series 15 , 15i) and the extended driver/library function are necessary. |
motor\cnc_rdctrldo
Reads "control output signal for spindle monitor".
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdctrldo(unsigned short FlibHndl,ODBSPDO *spdo);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||
| spdo | out |
Pointer to the ODBSPDO structure array including the control output signal for spindle monitor. The number of array must be equal to the following.
The data within the number of spindles acquired by cnc_rdnspdl function is valid.
ODBSPDO spdo[N] ; /* N : maximum spindle number */
The ODBSPDO structure is as follows.
typedef struct odbspdo {
char sgnl1 ; /* control output signal 1 */
char sgnl2 ; /* control output signal 2 */
char sgnl3 ; /* control output signal 3 */
char sgnl4 ; /* control output signal 4 */
} ODBSPDO ;
|
|||||||||||||||||||||||||||||||||||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||
| spdo | out |
Pointer to the ODBSPDO structure array including the control output signal for spindle monitor. The number of array must be 8. The data within the number of spindles acquired by cnc_rdnspdl function is valid.
ODBSPDO spdo[N] ; /* N : maximum spindle number */
The ODBSPDO structure is as follows.
typedef struct odbspdo {
char sgnl1 ; /* control output signal 1 */
char sgnl2 ; /* control output signal 2 */
char sgnl3 ; /* control output signal 3 */
char sgnl4 ; /* control output signal 4 */
} ODBSPDO ;
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The serial spindle function(only Series 15/15i) and the extended driver/library function are necessary. |
motor\cnc_rdcurrent
Reads "The servo adjustment real current".
When the following parameter is '0', '0' is always returned.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdcurrent(unsigned short FlibHndl,short *crrnt);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| crrnt | out |
Specify the address of the array to store the real current for servo adjustment. The number of array must be equal to the number of maximum controlled axis. The data within the number of controlled axis is valid.
short crrnt[MAX_AXIS] ; /* MAX_AXIS : maximum controlled axes */
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The extended driver/library function is necessary. |
motor\cnc_rdfromservoid2
Read specified servo id information from FROM. Each information is stored in member of the ODBCSVID2 structure.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdfromservoid2(unsigned short FlibHndl,
short axis, ODBCSVID2 *servoid);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle.See "Library handle" for details. |
| axis | in |
Specify the controlled axis number of reading servo ID information. |
| servoid | out |
Specify the pointer to a variable of ODBCSVID2 structure for setting servo ID information. The details of members of ODBCSVID2 structure are as follows. "NULL ('\0')" is added to the end of character strings.
typedef struct {
char mt_spc[20] ; /* Servo motor specification */
char mt_srn[10] ; /* Servo motor serial number */
char plc_spc[22] ; /* Pulse coder specification */
char plc_srn[9] ; /* Pulse coder serial number */
char svm_spc[22] ; /* SV specification */
char svm_srn[12] ; /* SV serial number */
char psm_spc[22] ; /* PS specification */
char psm_srn[12] ; /* PS serial number */
char svs_see[9] ; /* SV software series edition */
char pss_see[9] ; /* PS software series edition */
char pm1_spc[22] ; /* Separator 1 specification */
char pm1_srn[9] ; /* Separator 1 serial number */
char pm2_spc[22] ; /* Separator 2 specification */
char pm2_srn[9] ; /* Separator 2 serial number */
} ODBCSVID2 ;
|
ERRORS
| Code | Description |
|---|
motor\cnc_rdfromspindleid2
Read specified spindle id information from FROM. Each information is stored in member of the ODBCSPID2 structure.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdfromspindleid2(unsigned short FlibHndl,
short sp, ODBCSPID2 *spindleid);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle.See "Library handle" for details. |
| axis | in |
Specify the controlled spindle number of reading spindle ID information. |
| spindleid | out |
Specify the pointer to a variable of ODBCSPID2 structure for setting spindle ID information. The details of members of ODBCSPID2 structure are as follows. "NULL ('\0')" is added to the end of character strings.
typedef struct {
char mt_spc[20] ; /* Main SP motor specification */
char mt_srn[10] ; /* Main SP motor serial number */
char sbmt_spc[20] ; /* Sub SP motor specification */
char sbmt_srn[10] ; /* Sub SP motor serial number */
char spm_spc[22] ; /* SP specification */
char spm_srn[12] ; /* SP serial number */
char psm_spc[22] ; /* PS specification */
char psm_srn[12] ; /* PS serial number */
char pss_see[9] ; /* PS software series edition */
} ODBCSPID2 ;
|
ERRORS
| Code | Description |
|---|
motor\cnc_rdloopgain
Reads "The servo adjustment loop gain".
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdloopgain(unsigned short FlibHndl,long *gain);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| gain | out |
Specify the address of the array to store the loop gain for servo adjustment. The number of array must be equal to the number of maximum controlled axis. The data within the number of controlled axis is valid.
long gain[MAX_AXIS] ; /* MAX_AXIS : maximum controlled axes */
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The extended driver/library function is necessary. |
motor\cnc_rdnspdl
Reads the number of spindles which CNC can control. It is not the number of mounted spindles.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdnspdl(unsigned short FlibHndl,short *spdl);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||
| spdl | out |
Specify the address of the variable to store the number of spindles.
|
|||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||
| spdl | out |
Specify the address of the variable to store the number of spindles. |
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The serial spindle function(only Series 15) and the extended driver/library function are necessary. |
motor\cnc_rdopmode
Reads "The operation mode for spindle adjustment".
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdopmode(unsigned short FlibHndl,short *mode);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||
| mode | out |
Specify the address of the array to store the operation mode for spindle adjustment. The number of array must be equal to the following.
The data within the number of spindles acquired by cnc_rdnspdl function is valid.
short mode[N] ; /* N : maximum spindle number */
The meaning of the operation mode for the spindle adjustment is as follows.
* "Others" within above-mentioned mode shows the status which CNC does not control the spindle. |
||||||||||||||||||||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||
| mode | out |
Specify the address of the array to store the operation mode for spindle adjustment. The number of array must be 8. The data within the number of spindles acquired by cnc_rdnspdl function is valid.
short mode[N] ; /* N : maximum spindle number */
The meaning of the operation mode for the spindle adjustment is as follows.
* "Others" within above-mentioned mode shows the status which CNC does not control the spindle. |
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The serial spindle function and the extended driver/library function are necessary. |
motor\cnc_rdposerrs
Reads "The position deflection S for spindle adjustment".
The position deflection S is valid only when the operation mode is as follows.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdposerrs(unsigned short FlibHndl,long *poserr);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||
| poserr | out |
Specify the address of the array to store the position deflection S for spindle adjustment. The number of array must be equal to the following.
The data within the number of spindles acquired by cnc_rdnspdl function is valid.
short poserr[N] ; /* N : maximum spindle number */
|
|||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||
| poserr | out |
Specify the address of the array to store the position deflection S for spindle adjustment. The number of array must be 8. The data within the number of spindles acquired by cnc_rdnspdl function is valid.
short poserr[N] ; /* N : maximum spindle number */
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The serial spindle function and the extended driver/library function are necessary. |
motor\cnc_rdposerrs2
Reads "The position deflection S1, S2 for spindle adjustment" in the synchronous control mode.
The position deflection S1, S2 is valid only during the synchronous control mode.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdposerrs2(unsigned short FlibHndl,ODBPSER *pser);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| pser | out |
Pointer to the ODBPSER structure including the position deflection S1, S2 for spindle adjustment. The ODBPSER structure is as follows.
typedef struct odbpser {
long poserr1 ; /* position deflection S1 */
long poserr2 ; /* position deflection S2 */
} ODBPSER ;
|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| pser | out |
Pointer to the ODBPSER structure including the position deflection S1, S2 for spindle adjustment. The ODBPSER structure is as follows.
typedef struct odbpser {
long poserr1 ; /* position deflection S1 */
long poserr2 ; /* position deflection S2 */
} ODBPSER ;
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The serial spindle function and the extended driver/library function are necessary. |
motor\cnc_rdposerrz
Reads "The position deflection Z for spindle adjustment" in the rigid tapping mode.
The position deflection Z is valid only during the rigid tapping mode.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdposerrz(unsigned short FlibHndl,long *poserrz);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| poserrz | out |
Specify the address of the variable to store the position deflection Z of tapping axis for spindle adjustment. |
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The serial spindle function and the extended driver/library function are necessary. |
motor\cnc_rdservoid2
Read specified servo id information from adaptation device. Each information is stored in member of the ODBCSVID2 structure.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdservoid2(unsigned short FlibHndl, short axis, short type, ODBCSVID2 *servoid);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle.See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||
| axis | in |
Specify the controlled axis number of reading servo ID information. |
|||||||||||||||||||||||||||||||||||||||||||||
| type | in |
Specify the type of reading data for servo ID information. The type which can be specified is as follows.
|
|||||||||||||||||||||||||||||||||||||||||||||
| servoid | out |
Specify the pointer to a variable of ODBCSVID2 structure for setting servo ID information. The details of members of ODBCSVID2 structure are as follows. "NULL ('\0')" is added to the end of character strings.
typedef struct {
char mt_spc[20] ; /* Servo motor specification */
char mt_srn[10] ; /* Servo motor serial number */
char plc_spc[22] ; /* Pulse coder specification */
char plc_srn[9] ; /* Pulse coder serial number */
char svm_spc[22] ; /* SV specification */
char svm_srn[12] ; /* SV serial number */
char psm_spc[22] ; /* PS specification */
char psm_srn[12] ; /* PS serial number */
char svs_see[9] ; /* SV software series edition */
char pss_see[9] ; /* PS software series edition */
char pm1_spc[22] ; /* Separator 1 specification */
char pm1_srn[9] ; /* Separator 1 serial number */
char pm2_spc[22] ; /* Separator 2 specification */
char pm2_srn[9] ; /* Separator 2 serial number */
} ODBCSVID2 ;
|
ERRORS
| Code | Description |
|---|
motor\cnc_rdspdlalm
Reads the alarm number corresponding to the message of "spindle alarm for spindle monitor".
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdspdlalm(unsigned short FlibHndl,char *alm_no);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| alm_no | out |
Specify the address of the array to store the alarm number for "spindle alarm for spindle monitor". The number of array must be equal to the following.
The data within the number of spindles acquired by cnc_rdnspdl function is valid.
char alarm_no[N] ; /* N : maximum spindle number */
The messages for alarm number 1,..,38 are as follows. The alarm except the following doesn't have the message.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| alm_no | out |
Specify the address of the array to store the alarm number for "spindle alarm for spindle monitor". The number of array must be 8. The data within the number of spindles acquired by cnc_rdnspdl function is valid.
char alarm_no[N] ; /* N : maximum spindle number */
The messages for alarm number 1,..,38 are as follows. The alarm except the following doesn't have the message.
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The serial spindle function and the extended driver/library function are necessary. |
motor\cnc_rdspindleid2
Read specified spindle id information from adaptation device. Each information is stored in member of the ODBCSPID2 structure.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdspindleid2(unsigned short FlibHndl,
short sp, short type, ODBCSPID2 *spindleid);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle.See "Library handle" for details. |
||||||||||||||||||||||||||||||
| axis | in |
Specify the controlled spindle number of reading spindle ID information. |
||||||||||||||||||||||||||||||
| type | in |
Specify the type of reading data for spindle ID information. The type which can be specified is as follows.
|
||||||||||||||||||||||||||||||
| spindleid | out |
Specify the pointer to a variable of ODBCSPID2 structure for setting spindle ID information. The details of members of ODBCSPID2 structure are as follows. "NULL ('\0')" is added to the end of character strings.
typedef struct {
char mt_spc[20] ; /* Main SP motor specification */
char mt_srn[10] ; /* Main SP motor serial number */
char sbmt_spc[20] ; /* Sub SP motor specification */
char sbmt_srn[10] ; /* Sub SP motor serial number */
char spm_spc[22] ; /* SP specification */
char spm_srn[12] ; /* SP serial number */
char psm_spc[22] ; /* PS specification */
char psm_srn[12] ; /* PS serial number */
char pss_see[9] ; /* PS software series edition */
} ODBCSPID2 ;
|
ERRORS
| Code | Description |
|---|
motor\cnc_rdsrvspeed
Reads "The servo adjustment real speed".
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdsrvspeed(unsigned short FlibHndl,long *speed);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| speed | out |
Specify the address of the array to store the real speed for servo adjustment. The number of array must be equal to the number of maximum controlled axis. The data within the number of controlled axis is valid.
long speed[MAX_AXIS] ; /* MAX_AXIS : maximum controlled axes */
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The extended driver/library function is necessary. |
motor\cnc_rdsynerrrg
Reads "The synchronous error for spindle adjustment" in the rigid tapping mode.
The synchronous error in the synchronous control mode is able to be
acquired by cnc_rdsynerrsy function.
This synchronous error is valid only during the rigid tapping mode.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdsynerrrg(unsigned short FlibHndl,long *synerr);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| synerr | out |
Specify the address of the variable to store the synchronous error in the rigid tapping mode. |
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The serial spindle function and the extended driver/library function are necessary. |
motor\cnc_rdsynerrsy
Reads "The synchronous error for spindle adjustment" in the synchronous control mode.
The synchronous error in the rigid tapping mode is able to be acquired by
cnc_rdsynerrrg function.
This synchronous error is valid only during the synchronous control mode.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdsynerrsy(unsigned short FlibHndl,long *synerr);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| synerr | out |
Specify the address of the variable to store the synchronous error in the synchronous control mode. |
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The serial spindle function and the extended driver/library function are necessary. |
motor\cnc_wrfromservoid2
Write specified servo id information to FROM.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrfromservoid2(unsigned short FlibHndl,
short axis, ODBCSVID2 *servoid);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle.See "Library handle" for details. |
| axis | in |
Specify the controlled axis number of writing servo ID information. |
| servoid | in |
Specify the pointer to a variable of ODBCSVID2 structure to set servo ID information. The details of members of ODBCSVID2 structure are as follows. Specify "NULL ('\0')" to the end of character strings.
typedef struct {
char mt_spc[20] ; /* Servo motor specification */
char mt_srn[10] ; /* Servo motor serial number */
char plc_spc[22] ; /* Pulse coder specification */
char plc_srn[9] ; /* Pulse coder serial number */
char svm_spc[22] ; /* SV specification */
char svm_srn[12] ; /* SV serial number */
char psm_spc[22] ; /* PS specification */
char psm_srn[12] ; /* PS serial number */
char svs_see[9] ; /* SV software series edition */
char pss_see[9] ; /* PS software series edition */
char pm1_spc[22] ; /* Separator 1 specification */
char pm1_srn[9] ; /* Separator 1 serial number */
char pm2_spc[22] ; /* Separator 2 specification */
char pm2_srn[9] ; /* Separator 2 serial number */
} ODBCSVID2 ;
|
ERRORS
| Code | Description |
|---|
motor\cnc_wrfromspindleid2
Write specified spindle id information to FROM.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrfromspindleid2(unsigned short FlibHndl,
short sp, ODBCSPID2 *spindleid);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle.See "Library handle" for details. |
| axis | in |
Specify the controlled axis number of writing spindle ID information. |
| spindleid | in |
Specify the pointer to a variable of ODBCSPID2 structure to set spindle ID information. The details of members of ODBCSPID2 structure are as follows. Specify "NULL ('\0')" to the end of character strings.
typedef struct {
char mt_spc[20] ; /* Main SP motor specification */
char mt_srn[10] ; /* Main SP motor serial number */
char sbmt_spc[20] ; /* Sub SP motor specification */
char sbmt_srn[10] ; /* Sub SP motor serial number */
char spm_spc[22] ; /* SP specification */
char spm_srn[12] ; /* SP serial number */
char psm_spc[22] ; /* PS specification */
char psm_srn[12] ; /* PS serial number */
char pss_see[9] ; /* PS software series edition */
} ODBCSPID2 ;
|
ERRORS
| Code | Description |
|---|
ncdata\cnc_getmactype
Gets the type of custom macro variable which is used by
cnc_rdmacro,
cnc_wrmacro,
cnc_rdmacror,
cnc_wrmacror functions.
PROTOTYPE
FWLIBAPI short WINAPI cnc_getmactype(unsigned short FlibHndl, short *macro_type);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| macro_type | out |
|
ERRORS
| Code | Description |
|---|
ncdata\cnc_getpmactype
Gets the type of P code macro variable which is used by cnc_rdpmacro, cnc_wrpmacro, cnc_rdpmacror, cnc_wrpmacror functions.
PROTOTYPE
FWLIBAPI short WINAPI cnc_getpmactype(unsigned short FlibHndl, short *pmacro_type);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| pmacro_type | out |
|
ERRORS
| Code | Description |
|---|
ncdata\cnc_hpccactfine
Reads fine level for high-speed and high-precision machining.
PROTOTYPE
FWLIBAPI short WINAPI cnc_hpccactfine(unsigned short FlibHndl, short *fine);
ARGUMENTS
| Name | Direction | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||
| fine | out |
Current fine level is returned.
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used at T Series. |
| EW_NOOPT |
The extended driver/library function is necessary. |
ncdata\cnc_hpccatset
Commands CNC to set the setting data for high-speed and high-precision machining automatically.
PROTOTYPE
FWLIBAPI short WINAPI cnc_hpccatset(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used at T Series. |
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_PROT |
- Protection KEY(DI/KEY2) is off. - CNC parameter is a state of write-protection. |
| EW_PARAM |
Setting data cannot be set automatically. |
| EW_MODE |
The mode is not in MDI. |
ncdata\cnc_hpccattune
Commands CNC to tune up the tuning data for high-speed and high-precision machining automatically.
PROTOTYPE
FWLIBAPI short WINAPI cnc_hpccattune(unsigned short FlibHndl, short fine, short *stat);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||
| fine | in |
Specify the fine level which is used at automatic tuning-up.
|
|||||||||||||||
| stat | out |
Result status at automatic tuning-up will be set(only Series 15).
* When a bit is on, it means CNC has set the tuning data as the corresponding state. |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used at T Series. |
| EW_DATA |
Fine level(fine) is wrong. |
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_PROT |
- Protection KEY(DI/KEY2) is off. - CNC parameter is a state of write-protection. |
| EW_PARAM |
Setting data cannot be tuned up automatically. |
| EW_MODE |
The mode is not in MDI. |
| EW_REJECT |
Setting data(fine level, max. feedrate, time constant before interpolation) are not set.
Setting data(finish level, acceleration for acceleration/deceleration before interpolation(Acc for BIPL), parameter No.1825 for servo loop gain) are not set.
|
ncdata\cnc_hpccselfine
Selects fine level for high-speed and high-precision machining.
PROTOTYPE
FWLIBAPI short WINAPI cnc_hpccselfine(unsigned short FlibHndl, short fine);
ARGUMENTS
| Name | Direction | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||
| fine | in |
Specify the fine level.
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used at T Series. |
| EW_DATA |
Fine level(fine) is wrong. |
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_PROT |
CNC parameter is a state of write-protection. |
| EW_MODE |
The mode is not in MDI. |
ncdata\cnc_rdactfixofs
Reads the active fixture offset number and the active fixture offset value specified by "axis". The offset number is stored in "type" of "IODBZOFS" with binary format, and the offset value is stored in "data" array of "IODBZOFS" with signed binary format. The value for all axes can be read at a time by specifying 'ALL_AXES' in 'axis'. The place of decimal point can be got by cnc_getfigure function. The unit of active fixture offset value is the same as cnc_rdzofs function. See the description of cnc_rdzofs function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdactfixofs(unsigned short FlibHndl, short axis, IODBZOFS *fixofs);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| axis | in |
Specify the axis number.
|
||||||
| fixofs | out |
Pointer to the IODBZOFS structure for the active fixture offset value. The IODBZOFS structure is as follows.
typedef struct iodbzofs {
short datano; /* active offset number */
short type; /* axis number */
long data[MAX_AXIS]; /* offset data value */
} IODBZOFS ; /* MAX_AXIS : max. controlled axes */
IODBZOFS
n = Maximum controlled axes (* The data for current controlled axes are valid.) |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used at T Series. |
| EW_ATTRIB |
Axis number(axis) is wrong. |
| EW_NOOPT |
The rotary table dynamic fixture offset option and the extended driver/library function are necessary. The custom macro B option is necessary(only 16i/18i/21i). |
ncdata\cnc_rdbaxis
Reads the command data for B axis(current command, next command). The unit of command data is as follows. The unit of speed is as follows.
1004#1
(ISC)Linear axis
mm input
[mm]Linear axis
inch input
[inch]
IS-B
0
0.001
0.0001
IS-C
1
0.0001
0.00001
mm input
[mm] inch input
[inch]
G98
1
0.01
G99
0.0001
0.000001
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdbaxis(unsigned short FlibHndl, ODBBAXIS *baxis);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||
| baxis | out |
Pointer to the ODBBAXIS structure for the command data for B axis. The ODBBAXIS structure is as follows.
typedef struct odbbaxis {
short flag ; /* existence of command */
short command ; /* command */
unsigned short speed ; /* speed */
long sub_data ; /* supplement of command */
} ODBBAXIS ;
ODBBAXIS baxis[2] ;
baxis[0] : current command data
baxis[1] : next command data
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used at M series. |
| EW_NOOPT |
The B axis control option and the extended driver/library function are necessary. |
ncdata\cnc_rdbtofsinfo
Reads the memory type of tool offset for B axis, the available number
and the auxiliary function number which means offset cancel.
These are stored in "ofs_type", "use_no" and "sub_no" of "ODBBTLINF" with binary format.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdbtofsinfo(unsigned short FlibHndl, ODBBTLINF *btlinf);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| btlinf | out |
Pointer to the ODBBTLINF structure for the tool offset information for B axis. The ODBBTLINF structure is as follows.
typedef struct odbbtlinf {
short ofs_type; /* memory type */
short use_no; /* available number */
short sub_no; /* aux. function number */
} ODBBTLINF ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used at M series. |
| EW_NOOPT |
The B axis control option and the extended driver/library function are necessary. |
ncdata\cnc_rdbtofsr
Reads the tool offset value for B axis specified by "s_number", "e_number", "type". The offset value is stored in "IODBBTO" with signed binary format. The unit of offset value is the same as cnc_rdtofs function. See the description of cnc_rdtofs function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdbtofsr(unsigned short FlibHndl, short s_number, short type, short e_number, short length, IODBBTO *btofsr);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||
| s_number | in |
Specify the start tool offset number. The available number is 1,...,9. 'This number + aux. function number which can be got by cnc_rdbtofsinfo function + 1' means the tool offset number for B axis which is used by NC command or display. |
|||||||||||||||||||||||||||||||||||||
| e_number | in |
Specify the end tool offset number. The available number is 1,...,9. |
|||||||||||||||||||||||||||||||||||||
| type | in |
Specify the tool offset type.(see the following table) |
|||||||||||||||||||||||||||||||||||||
| length | in |
Specify the data block length. The combinations of the value specified in "type", the data block length "length", the kind of offset value to be read and the member where the result is stored are as follows.
is number of offset to be read, i = 0,..,(N-1). |
|||||||||||||||||||||||||||||||||||||
| btofsr | out |
Pointer to the IODBBTO structure including the tool offset value. The IODBBTO structure is as follows.
typedef struct iodbbto {
short datano_s; /* start offset number */
short type; /* offset type */
short datano_e; /* end offset number */
long ofs[M]; /* offset value */
} IODBBTO ; /* M : M is number of the offset value.(Individual, Memory A all)
M is number of the offset value * 2.(Memory B all) */
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used at M series. |
| EW_LENGTH |
Size of IODBBTO structure (length) is wrong. |
| EW_NUMBER |
Offset number (s_number, e_number) is wrong. |
| EW_ATTRIB |
Offset type (type) is wrong. |
| EW_NOOPT |
The B axis control option and the extended driver/library function are necessary. |
ncdata\cnc_rdexecmcode
Reads specified number of executing or executed M codes, starting from the M code group with specified number.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdexecmcode(unsigned short FlibHndl, short s_no, short *num, ODBEXEM *buf);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| s_no | in |
Specify M code group number. |
||||||
| num | in / out |
Pointer to the number of M code groups to be read. |
||||||
| buf | out |
Pointer to the ODBEXEM structure where returned data are stored. The ODBEXEM structure is as follows.
typedef struct odbexem {
short grp_no;
short mem_no;
struct{
long no;
short flag;
}m_code[5];
char m_name[21];
char dummy;
} ODBEXEM;
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
The number indication(num) is wrong. |
| EW_NUMBER |
The start number(s_no) is wrong. |
| EW_NOOPT |
The M code group option and the extended driver/library function are necessary. |
ncdata\cnc_rdfixofs
Reads the fixture offset value specified by "s_number", "e_number", "axis". The offset value is stored in "data" array of "IODBZOR" with signed binary format. The value for all axes can be read at a time by specifying 'ALL_AXES' in 'axis'. The place of decimal point can be got by cnc_getfigure function. The unit of fixture offset value is the same as cnc_rdzofs function. See the description of cnc_rdzofs function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdfixofs(unsigned short FlibHndl, short s_number, short axis, short e_number, short length, IODBZOR *fixofsr);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| s_number | in |
Specify the start fixture offset number. Available number is from 1 to 8. |
||||||
| e_number | in |
Specify the end fixture offset number. Available number is from 1 to 8. |
||||||
| axis | in |
Specify the axis number.
|
||||||
| length | in |
Specify the data block length (size of IODBZOR structure). 8+4*(number of axes)*(number of offset) IODBZOR
n = Maximum controlled axes (* The data for current controlled axes are valid.)) |
||||||
| fixofsr | out |
Pointer to the IODBZOR structure for the fixture offset value. The IODBZOR structure is as follows.
typedef struct iodbzor {
short datano_s; /* start offset number */
short type; /* axis number */
short datano_e; /* end offset number */
long data[MAX_AXIS*K]; /* offset data value */
} IODBZOR ; /* MAX_AXIS : max. controlled axes */
/* K : number of offset */
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used at T Series. |
| EW_LENGTH |
Size of IODBZOR structure(length) is wrong. |
| EW_NUMBER |
Fixture offset number(s_number, e_number) is wrong. |
| EW_ATTRIB |
Axis number(axis) is wrong. |
| EW_NOOPT |
The rotary table dynamic fixture offset option and the extended driver/library function are necessary. |
ncdata\cnc_rdhpccset
Reads setting data for High-speed and high-precision machining.
The data is stored in each member of "IODBHPST". This function is not supported on Series 15i. The function which reads
CNC parameter ( cnc_rdparam or cnc_rdparar ) can be substituted for this function.
Refer to CNC operator's manual and CNC parameter manual in order to
know CNC parameters which correspond to the data which are read by this
function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdhpccset(unsigned short FlibHndl, IODBHPST *hpst);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| hpst | out |
Pointer to the IODBHPST structure for the setting data for High-speed and high-precision machining. The IODBHPST structure is as follows.
typedef struct iodbhpst {
short slct; /* flag of valid data */
short hpcc; /* high precision contour control */
short multi; /* multi buffer */
short ovr1; /* override by Z-axis down */
short ign_f; /* ignore feed at program */
short foward; /* feed forward */
long max_f; /* maximum feed of high precision */
/* contour control */
short ovr2; /* override at area 2 */
short ovr3; /* override at area 3 */
short ovr4; /* override at area 4 */
long reserve[7]; /* (not used) */
} IODBHPST ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used at T Series |
| EW_NOOPT |
The extended driver/library function is necessary. |
ncdata\cnc_rdhpcctuac
Reads tuning data(acc./dec. input) for high-speed and high-precision
machining. The data is stored in each member of "IODBHPAC". This function is not supported on Series 15i. The function which reads
CNC parameter ( cnc_rdparam or cnc_rdparar ) can be substituted for this function.
Refer to CNC operator's manual and CNC parameter manual in order to know CNC parameters which correspond to the data which are read by this function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdhpcctuac(unsigned short FlibHndl, IODBHPAC *hpac);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||
| hpac | out |
Pointer to the IODBHPAC structure for the tuning data(acc./dec. input) for high-speed and high-precision machining. The IODBHPAC structure is as follows.
typedef struct iodbhpac {
struct {
short slct; /* flag of valid data */
short diff; /* flag of data status */
short fine; /* fine level */
short acc_lv; /* acceleration/deceleration level*/
long bipl; /* acceleration for before IPL */
short aipl; /* time constant for after IPL */
long corner; /* difference of corner feed */
long clamp; /* acceleration for clamp */
long c_acc; /* acceleration of feed clamp by */
/* radius of cercle*/
long foward; /* coefficient of feed forward */
long reserve[8]; /* (not used) */
}tune[3]
} IODBHPAC ;
hpac.tune[0].slct,...,hpac.tune[0].reserve
: tuning data for fine level
hpac.tune[1].slct,...,hpac.tune[1].reserve
: tuning data for medium level
hpac.tune[2].slct,...,hpac.tune[2].reserve
: tuning data for rough level
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used at T Series. |
| EW_NOOPT |
The extended driver/library function is necessary. |
ncdata\cnc_rdhpcctupr
Reads tuning data(parameter input) for high-speed and high-precision machining. The data is stored in each member of "IODBHPPR". This function is not supported on Series 15i. The function which reads CNC parameter ( cnc_rdparam or cnc_rdparar ) can be substituted for this
function.
Refer to CNC operator's manual and CNC parameter manual in order to
know CNC parameters which correspond to the data which are read by this
function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdhpcctupr(unsigned short FlibHndl, IODBHPPR *hppr);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| hppr | out |
Pointer to the IODBHPPR structure for the tuning data(parameter input) for high-speed and high-precision machining. The IODBHPPR structure is as follows.
typedef struct iodbhppr {
struct {
short slct; /* flag of valid data */
short diff; /* flag of data status */
short fine; /* fine level */
short acc_lv; /* acceleration/deceleration level*/
long max_f; /* maximum feed */
short bipl; /* time constant for before IPL */
short aipl; /* time constant for after IPL */
long corner; /* difference of corner feed */
short clamp; /* clamp by acceleration */
long radius; /* radius of feed clamp by radius*/
/* of circle*/
long max_cf; /* maximum feed of feed clamp by */
/* radius of circle*/
long min_cf; /* minimum feed of feed clamp by */
/* radius of circle*/
long foward; /* coefficient of feed forward */
long reserve[5]; /* (not used) */
}tune[3]
} IODBHPPR ;
hppr.tune[0].slct,...,hppr.tune[0].reserve
: tuning data for fine level
hppr.tune[1].slct,...,hppr.tune[1].reserve
: tuning data for medium level
hppr.tune[2].slct,...,hppr.tune[2].reserve
: tuning data for rough level
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used at T Series. |
| EW_NOOPT |
The extended driver/library function is necessary. |
ncdata\cnc_rdhsparam
The CNC parameter shown by parameter information is read at high speed. When specified parameter information is illegal, the operation of this function is not guaranteed.
The parameter can be read according to parameter information acquired
by cnc_rdhsprminfo. The reading speed is high more than cnc_rdparar.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdhsparam(unsigned short FlibHndl, long num_prm, HSPINFO *info, HSPDATA *data);
ARGUMENTS
| Name | Direction | Description | ||||
|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||
| num_prm | in |
Specify the numbers of parameter which wants to read. |
||||
| info | in |
Specify the pointer to the array of HSPINFO structure where parameter information was stored. When parameter information of numbers which specified by num_prm is not stored, the operation of this function is not guaranteed. |
||||
| data | out |
Specify the pointer to the array of HSPDATA union to store the value of the got parameter. HSPDATA union is as follows.
typedef union hspdata {
char cdata[MAX_AXIS];
short idata[MAX_AXIS];
long ldata[MAX_AXIS];
} HSPDATA;
When the area to store the parameter data of numbers which specified by num_prm is not prepared, the operation of this function is not guaranteed. |
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
the numbers of specified parameter is wrong. |
| EW_NUMBER |
The parameter shown by parameter information does not exist. |
| EW_NOOPT |
|
| EW_PROT |
Specified parameter is protected. |
ncdata\cnc_rdhsprminfo
Get information for high-speed read of parameter.
Got parameter information is effective until the reboot of CNC.
Moreover, got parameter information is available to another thread of
this application.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdhsprminfo(unsigned short FlibHndl, long prm_no, HSPINFO *info);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| prm_no | in |
Specify the parameter number |
| info | out |
Specify the pointer to HSPINFO structure to store the parameter information is specified. Got parameter information is used by cnc_rdhsparam. |
ERRORS
| Code | Description |
|---|---|
| EW_NUMBER |
The specified parameter number does not exist. |
| EW_NOOPT |
|
| EW_PROT |
The specified parameter is protected. |
ncdata\cnc_rdintchk
Reads the coordinate value of interference check area specified by
"s_number", "e_number", "type". The coordinate value is stored in "data" array of "IODBINT" with signed binary format. All value can be read at a time by specifying ALL_AXES for "axis". The places of decimal points can be got by cnc_getfigure function. The unit of coordinate value is the same as "Read work zero offset
value( cnc_rdzofs )". See the description of cnc_rdzofs function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdintchk(unsigned short FlibHndl, short s_number, short type, short e_number, short length, IODBINT *intchk);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||
| s_number | in |
Specify the start interference check data number. |
||||||||||||||||||||||||||||||||||||||||
| e_number | in |
Specify the end interference check data number. |
||||||||||||||||||||||||||||||||||||||||
| type | in |
Specify the type of coordinate.
In case of 1 coordinate, 'type' is as follows.
|
||||||||||||||||||||||||||||||||||||||||
| length | in |
Specify the data block length(size of IODBINT structure). (8+4*(number of coordinate)*(number of data)) T series IODBINT
K : Number of data to be read
M series IODBINT
|
||||||||||||||||||||||||||||||||||||||||
| intchk | out |
Pointer to the IODBINT structure for the coordinate value of interference check data. The IODBINT structure is as follows.
typedef struct iodbint {
short datano_s; /* start data number */
short type; /* coordinate type */
short datano_e; /* end data number */
long data[8*K]; /* coordinate value */
} IODBINT ; /* K : number of data to be read */
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used without 2 path control function. |
| EW_LENGTH |
Size of IODBINT structure(length) is wrong. |
| EW_NUMBER |
Data number(s_number, e_number) is wrong. |
| EW_ATTRIB |
Type of coordinate(type) is wrong. |
| EW_NOOPT |
The tool post interference check option (T series) or the multi-path interference check option (M series), and the extended driver/library function are necessary. |
ncdata\cnc_rdintinfo
Reads the available number of interference check data.
It is stored in (*intinf) with binary format.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdintinfo(unsigned short FlibHndl, short *intinf);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| intinf | out |
Pointer to the available number of interference check data.
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used without 2 path control function. |
| EW_NOOPT |
The tool post interference check option (T series) or the multi-path interference check option (M series), and the extended driver/library function are necessary. |
ncdata\cnc_rdmacro
Reads the custom macro variable specified by "number". The data is stored in "ODBM" with signed binary format. The kinds of custom macro variable are as follows. It is possible to exchange the type of macro variable by cnc_setmactype function. mcr_val always returns by nine digits and adjusts the amount with the value of dec_val. The value of an undefined variable is called "vacant", and it is expressed as follows both at decimal form floating-point type and at binary form floating-point type. mcr_val = 0 See "OPERATOR'S MANUAL" of CNC for details of the custom macro variable.
mcr_val
:
value of variable (=M)
4-byte binary data with sign
(available range:999999999,..,-999999999)
dec_val
:
number of places of decimals (=E)
2-byte binary data with sign
(available range:-128,..,127)
Example: When the variable value is 12.345, mcr_val and dec_val are read as follows.
mcr_val = 123450000
dec_val = 7
mcr_val
:
numerical part of variable (=M)
4-byte binary data with sign
(available range:No limitation)
dec_val
:
exponent part of variable (=E)
2-byte binary data with sign
(available range:-128,..,127)
dec_val = -1
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdmacro(unsigned short FlibHndl, short number, short length, ODBM *macro);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| number | in |
Specify the custom macro variable number. |
| length | in |
Specify the data block length (size of ODBM structure=10). ODBM
|
| macro | out |
Pointer to the ODBM structure including the custom macro variable. The ODBM structure is as follows.
typedef struct odbm {
short datano ; /* custom macro variable number */
short dummy ; /* (not used) */
long mcr_val ; /* value of custom macro variable */
short dec_val ; /* number of places of decimals */
} ODBM ;
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of ODBM structure(length) is wrong. |
| EW_NUMBER |
Custom macro variable number(number) is wrong. |
| EW_NOOPT |
This function needs the custom macro option. |
ncdata\cnc_rdmacroinfo
Reads the available number of the local macro variable and the common macro variable. Those are stored in "use_no1", "use_no2" of "ODBMVINF" with signed binary format.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdmacroinfo(unsigned short FlibHndl, ODBMVINF *mvinf);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| mvinf | out |
Pointer to the ODBMVINF structure including the custom macro variable information. The ODBMVINF structure is as follows.
typedef struct odbmvinf {
short use_no1 ; /* number of local variable */
short use_no2 ; /* indicator of common variable */
} ODBMVINF ;
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| mvinf | out |
Pointer to the ODBMVINF structure including the custom macro variable information. The ODBMVINF structure is as follows.
typedef struct odbmvinf {
short use_no1 ; /* number of local variable */
short use_no2 ; /* indicator of common variable */
} ODBMVINF ;
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
This function needs the custom macro option. |
ncdata\cnc_rdmacror
Reads the custom macro variable specified by "datano_s", "datano_e". The data is stored in "IODBMR" with signed binary format. The kinds of custom macro variable are as follows. It is possible to exchange the type of macro variable by cnc_setmactype function. mcr_val always returns by nine digits and adjusts the amount with the value of dec_val. The value of an undefined variable is called "vacant", and it is expressed as follows both at decimal form floating-point type and at binary form floating-point type. mcr_val = 0 See "OPERATOR'S MANUAL" of CNC for details of the custom macro variable.
mcr_val
:
value of variable (=M)
4-byte binary data with sign
(available range:999999999,..,-999999999)
dec_val
:
number of places of decimals (=E)
2-byte binary data with sign
(available range:-128,..,127)
Example: When the variable value is 12.345, mcr_val and dec_val are read as follows.
mcr_val = 123450000
dec_val = 7
mcr_val
:
numerical part of variable (=M)
4-byte binary data with sign
(available range:No limitation)
dec_val
:
exponent part of variable (=E)
2-byte binary data with sign
(available range:-128,..,127)
dec_val = -1
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdmacror( unsigned short FlibHndl, short s_number, short e_number, short length, IODBMR *macror );
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| s_number | in |
Specify the start custom macro variable number. |
| e_number | in |
Specify the end custom macro variable number. |
| length | in |
Specify the data block length (size of IODBMR structure). 8+8*(Number of custom macro variable) IODBMR
N : Number of custom macro variable |
| macror | out |
Pointer to the IODBMR structure including the custom macro variable. The IODBMR structure is as follows.
typedef struct iodbmr {
short datano_s; /* start custom macro variable number*/
short dummy; /* (not used) */
short datano_e; /* end custom macro variable number */
struct {
long mcr_val; /* value of custom macro var. */
short dec_val; /* number of places of decimals*/
} data[N]; /* N : number of variable */
} IODBMR;
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of IODBMR structure(length) is wrong. |
| EW_NUMBER |
Custom macro variable number(s_number, e_number) is wrong. |
| EW_NOOPT |
This function needs the custom macro option. |
ncdata\cnc_rdmacror2
Reads the custom macro variables specified by the starting number, "s_no", and number of variables, "*num". The data is stored in "data" with double format. It is not influenced by setting of cnc_setmactype function. The kinds of custom macro variable are as follows. The value of an undefined variable is called "vacant", and it is expressed as follows. 0xFFFFFFFFFFFFFFFF See "OPERATOR'S MANUAL" of CNC for details of the custom macro variable.
(1)
Local variable (#1,..,#33)
The local variables which belong to the macro program just being executed when the application program calls this function are read.
(2)
Common variable (#100,..,#999)
See the description of cnc_rdmacroinfo function about the available range of common variables.
(3)
System variable (#1000〜)
In case of system variable, the variable can be read one by one at a time.
(4)
Common variable (#98000〜#98499)
See the description of cnc_rdmacroinfo function about the available range of common variables.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdmacror2(unsigned short FlibHndl, unsigned long s_no, unsigned long *num, double *data);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| s_no | in |
Specify the start custom macro variable number. |
| num | in/out |
Specify pointer to the number of custom macro variable. |
| data | out |
Pointer to the data of custom macro variable. |
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
The number of custom macro variables(*num) is 0 or less. |
| EW_NUMBER |
Custom macro variable number(s_no) is wrong. |
| EW_NOOPT |
This function needs the custom macro option. |
ncdata\cnc_rdmacror3
Reads the custom macro variables specified by the starting number, "s_no", and number of variables, "*num". The kinds of custom macro variable are as follows. The value of an undefined variable is called "vacant", and it is expressed as follows. 0xFFFFFFFFFFFFFFFF See "OPERATOR'S MANUAL" of CNC for details of the custom macro variable.
In this function, when you read the macro variable No. #500-#549, the macro name can be read together. In other variable numbers, NULL is read to the name.
It is not influenced by setting of cnc_setmactype function.
(1)
Local variable (#1,..,#33)
The local variables which belong to the macro program just being executed when the application program calls this function are read.
(2)
Common variable (#100,..,#999)
See the description of cnc_rdmacroinfo function about the available range of common variables.
(3)
System variable (#1000〜)
In case of system variable, the variable can be read one by one at a time.
(4)
Common variable (#98000〜#98499)
See the description of cnc_rdmacroinfo function about the available range of common variables.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdmacror3(unsigned short FlibHndl, unsigned long s_no, unsigned long *num, IODBMRN3 *mcr);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| s_no | in |
Specify the start custom macro variable number. |
| num | in/out |
Specify pointer to the number of custom macro variable. |
| mcr | out |
Pointer to the IODBMRN3 structure for the information of custom macro variable. The IODBMRN3 structure is as follows.
typedef struct iodbmrn {
double mcr_val ; /* custom macro variable */
char name[32] ; /* Macro name (includee NULL code) */
} IODBMRN3 ;
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
The number of custom macro variables(*num) is 0 or less. |
| EW_NUMBER |
Custom macro variable number(s_no) is wrong. |
| EW_NOOPT |
This function needs the custom macro option. |
ncdata\cnc_rdmgrpdata
Reads specified number of M code group data starting from the specified number.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdmgrpdata(unsigned short FlibHndl, short s_no, short *num, ODBMGRP *buf);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| s_no | in |
Specify starting number from which the data is read. Valid range is from 0 to 499. |
| num | in / out |
Pointer to the number of data to be read. Specify the number of data to be read before function call and actual number of data being read is stored after the function call. Valid range is from 1 to 500. |
| buf | out |
Pointer to the ODBMGRP structure where returned data are stored. The ODBMGRP structure is as follows.
typedef struct odbmgrp {
long m_code;
short grp_no;
char m_name[21];
char dummy;
} ODBMGRP;
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
The number indication(num) is wrong. |
| EW_NUMBER |
The start number(s_no) is wrong. |
| EW_NOOPT |
The M code group option and the extended driver/library function are necessary. |
ncdata\cnc_rdparainfo
Reads the CNC parameter information specified by "s_number" and "read_no". The CNC parameter is basically non-continuous, and the attribute like the type and the size, etc. is different in each number. Use this function for such as displaying the parameter.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdparainfo(unsigned short FlibHndl, short s_number, unsigned short read_no, ODBPARAIF *paraif);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| s_number | in |
Specify the start parameter number. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| read_no | in |
Specify the number of parameter information to be read. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| paraif | out |
Pointer to the ODBPARAIF structure including the parameter information. The ODBPARAIF structure is as follows.
typedef struct odbparaif {
unsigned short info_no ; /* number of parameter information */
short prev_no ; /* previous parameter number */
short next_no ; /* next parameter number */
struct {
short prm_no ; /* parameter number */
short prm_type ; /* attribute of parameter */
} info[N] ; /* N is number of parameter information */
} ODBPARAIF ;
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| s_number | in |
Specify the start parameter number. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| read_no | in |
Specify the number of parameter information to be read. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| paraif | out |
Pointer to the ODBPARAIF structure including the parameter information. The ODBPARAIF structure is as follows.
typedef struct odbparaif {
unsigned short info_no ; /* number of parameter information */
short prev_no ; /* previous parameter number */
short next_no ; /* next parameter number */
struct {
short prm_no ; /* parameter number */
short prm_type ; /* attribute of parameter */
} info[N] ; /* N is number of parameter information */
} ODBPARAIF ;
|
ERRORS
| Code | Description |
|---|---|
| EW_NUMBER |
Start parameter number (s_number) is wrong. |
ncdata\cnc_rdparainfo3
Reads the CNC parameter information specified by "s_number" and "*read_no". The CNC parameter is basically non-continuous, and the attribute like the type and the size, etc. is different in each number. Use this function for such as displaying the parameter. This function can read the information of path type and machine group type of the parameter.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdparainfo3( unsigned short FlibHndl, short s_number, short* read_no, short* prev_no, short* next_no, ODBPARAIF2 info[] );
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| s_number | in |
Specify the start parameter number. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| read_no | in/out |
Specify the number of parameter information to be read. The number which was read actually is returned. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| prev_no | out |
Pointer to valiable of the previous parameter number to read. After the function returns, parameter number which exists before the number indicated as s_number is set. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| next_no | out |
Pointer to valiable of the next parameter number to read. After the function returns, parameter number which exists after the number to read is set. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| info | out |
Pointer to the ODBPARAIF2 structure including the parameter information. The ODBPARAIF2 structure is as follows.
typedef struct odbparaif2 {
short prm_no; /* number of parameter */
short size; /* parameter size */
short array; /* arrange type */
short unit; /* unit */
short dim; /* dimension */
short input; /* inout type */
short display; /* display information */
short others; /* other information */
} ODBPARAIF2 ;
|
ERRORS
| Code | Description |
|---|---|
| EW_NUMBER |
Start parameter number (s_number) is wrong. |
ncdata\cnc_rdparam
Reads the parameter specified by "number","axis"(only for the parameter
with axis). The data format depends on each parameter. The format of
Byte/Word/2-Word parameter is generally signed binary format.
Reads the parameter for all axes once by specifying 'ALL_AXES' in
'axis'. The parameter for each axis is stored in each array of
"IODBPSD". The attribute of CNC parameter depends on the type and axis, and it is
different for each parameter. It is as follows, and can be got by
cnc_rdparainfo function. It is impossible to read any bit parameter bit by bit. 8 bits(i.e. 1 byte) which belong to the same parameter number are read at the same time. See the "PARAMETER MANUAL" of CNC for details of each parameter.
Parameter type
Meaning
Byte size
Bit parameter
Every bits have each definition.
1
Bit parameter with axis
Every bits have each definition. (each axis)
1
Byte parameter
1-byte data is stored.
1
Byte parameter with axis
1-byte data is stored. (each axis)
1
Word parameter
2-byte data is stored.
2
Word parameter with axis
2-byte data is stored. (each axis)
2
2-Word parameter
4-byte data is stored.
4
2-Word parameter with axis
4-byte data is stored. (each axis)
4
Real parameter
(only Series 15i, 30i, 0i-D/F, PMi-A)
4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored.
8
Real parameter with axis
(only Series 15i, 30i, 0i-D/F, PMi-A)
4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored. (each axis)
8
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdparam(unsigned short FlibHndl, short number, short axis, short length, IODBPSD *param);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||
| number | in |
Specify the parameter number. |
||||||||||||||||||||||||
| axis | in |
Specify the axis number.
|
||||||||||||||||||||||||
| length | in |
Specify the data block length(size of IODBPSD structure). (4+(byte size of parameter)*(number of axis)) In case that the size of parameter is 4 byte, the IODBPSD structure is as follows. In case that its size is 1, 2, or 8 byte, the size of data part per 1 parameter or 1 axis is 1, 2, or 8 byte. IODBPSD
n = Maximum controlled axes
n = Current controlled axes The spindle parameters have an axis attribute, and the data for number of spindle are valid. |
||||||||||||||||||||||||
| param | out |
Pointer to the IODBPSD structure including the parameter. The IODBPSD structure is as follows.
Series 15, 16/18/21, 16i/18i/21i, 0i-A/B and Power Mate i
typedef struct iodbpsd {
short datano; /* parameter number */
short type; /* upper byte:type */
/* lower byte:axis */
union {
char cdata; /* bit/byte parameter */
short idata; /* word parameter */
long ldata; /* 2-word parameter */
char cdatas[MAX_AXIS]; /* bit/byte parameter with axis*/
short idatas[MAX_AXIS]; /* word parameter with axis */
long ldatas[MAX_AXIS]; /* 2-word parameter with axis */
} u ;
} IODBPSD ; /* MAX_AXIS : max. controlled axes */
Series 15i, 30i, 0i-D/F, PMi-A and Ethernet connection
typedef struct realprm { /* real parameter */
long prm_val; /* value of variable */
long dec_val; /* number of places of decimals */
} REALPRM;
typedef struct iodbpsd {
short datano; /* parameter number */
short type; /* upper byte:type */
/* lower byte:axis */
union {
char cdata; /* bit/byte parameter */
short idata; /* word parameter */
long ldata; /* 2-word parameter */
REALPRM rdata; /* real parameter */
char cdatas[MAX_AXIS];/*bit/byte parameter with axis*/
short idatas[MAX_AXIS];/* word parameter with axis */
long ldatas[MAX_AXIS];/* 2-word parameter with axis */
REALPRM rdatas[MAX_AXIS];/* real parameter with axis */
} u;
} IODBPSD ; /* MAX_AXIS : max. controlled axes */
|
||||||||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||
| number | in |
Specify the parameter number. |
||||||||||||||||||||||||
| axis | in |
Specify the axis number.
|
||||||||||||||||||||||||
| length | in |
Specify the data block length(size of IODBPSD structure). (4+(byte size of parameter)*(number of axis)) In case that the size of parameter is 4 byte, the IODBPSD structure is as follows. In case that its size is 1, 2, or 8 byte, the size of data part per 1 parameter or 1 axis is 1, 2, or 8 byte. IODBPSD
The spindle parameters have an axis attribute, and the data for number of spindle are valid. |
||||||||||||||||||||||||
| param | out |
Pointer to the IODBPSD structure including the parameter. The IODBPSD structure is as follows.
typedef struct realprm { /* real parameter */
long prm_val; /* value of variable */
long dec_val; /* number of places of decimals */
} REALPRM;
typedef struct iodbpsd {
short datano; /* parameter number */
short type; /* upper byte:type */
/* lower byte:axis */
union {
char cdata; /* bit/byte parameter */
short idata; /* word parameter */
long ldata; /* 2-word parameter */
REALPRM rdata; /* real parameter */
char cdatas[MAX_AXIS];/*bit/byte parameter with axis*/
short idatas[MAX_AXIS];/* word parameter with axis */
long ldatas[MAX_AXIS];/* 2-word parameter with axis */
REALPRM rdatas[MAX_AXIS];/* real parameter with axis */
} u;
} IODBPSD ; /* MAX_AXIS : max. controlled axes */
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of IODBPSD structure(length) is wrong. |
| EW_NUMBER |
Parameter number(number) is wrong. |
| EW_ATTRIB |
Axis number(axis) is wrong. |
| EW_PASSWD |
( Series 16i/18i/21i, 0i ) |
ncdata\cnc_rdparam3
Reads the parameter specified by "number","axis"(only for the parameter with axis).
Reads the parameter for all axes once by specifying 'ALL_AXES' in 'axis'.
The attribute of CNC parameter depends on the type and axis, and it is different for each parameter. It is impossible to read any bit parameter bit by bit. 8 bits(i.e. 1 byte) which belong to the same parameter number are read at the same time. See the "PARAMETER MANUAL" of CNC for details of each parameter.
In this function, the acquired information can specify a relative axis or an absolute axis by argument("absolute").
The relative axis means the current path and the absolute axis means all CNC paths.
The data format depends on each parameter. The format of Byte/Word/2-Word parameter is generally signed binary format.
The parameter for each axis is stored in each array of "IODBPSD".
It is as follows, and can be got by cnc_rdparainfo function.
Parameter type
Meaning
Byte size
Bit parameter
Every bits have each definition.
1
Bit parameter with axis
Every bits have each definition. (each axis)
1
Byte parameter
1-byte data is stored.
1
Byte parameter with axis
1-byte data is stored. (each axis)
1
Word parameter
2-byte data is stored.
2
Word parameter with axis
2-byte data is stored. (each axis)
2
2-Word parameter
4-byte data is stored.
4
2-Word parameter with axis
4-byte data is stored. (each axis)
4
Real parameter
4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored.
8
Real parameter with axis
4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored. (each axis)
8
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdparam3(unsigned short FlibHndl, short number, short axis, short length, short absolute, IODBPSD *param);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||
| number | in |
Specify the parameter number. |
||||||||||||||||||||||||
| axis | in |
Specify the axis number.
|
||||||||||||||||||||||||
| length | in |
Specify the data block length(size of IODBPSD structure). (4+(byte size of parameter)*(number of axis)) In case that the size of parameter is 4 byte, the IODBPSD structure is as follows. In case that its size is 1, 2, or 8 byte, the size of data part per 1 parameter or 1 axis is 1, 2, or 8 byte. IODBPSD
n = Maximum controlled axes The spindle parameters have an axis attribute, and the data for number of spindle are valid. |
||||||||||||||||||||||||
| absolute | in |
Specify whether to acquire by a relative axis or an absolute axis at the parameter read.
|
||||||||||||||||||||||||
| param | out |
Pointer to the IODBPSD structure including the parameter. The IODBPSD structure is as follows.
typedef struct realprm { /* real parameter */
long prm_val; /* value of variable */
long dec_val; /* number of places of decimals */
} REALPRM;
typedef struct iodbpsd {
short datano; /* parameter number */
short type; /* upper byte:type */
/* lower byte:axis */
union {
char cdata; /* bit/byte parameter */
short idata; /* word parameter */
long ldata; /* 2-word parameter */
REALPRM rdata; /* real parameter */
char cdatas[MAX_AXIS];/*bit/byte parameter with axis*/
short idatas[MAX_AXIS];/* word parameter with axis */
long ldatas[MAX_AXIS];/* 2-word parameter with axis */
REALPRM rdatas[MAX_AXIS];/* real parameter with axis */
} u;
} IODBPSD ; /* MAX_AXIS : max. controlled axes */
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of IODBPSD structure(length) is wrong. |
| EW_NUMBER |
Parameter number(number) is wrong. |
| EW_ATTRIB |
Axis number(axis) is wrong. |
ncdata\cnc_rdparam_ext
Reads the random number parameters. The parameter numbers are specified by the array of long type ("prm_no[]"). And the number of the array is specified by "num". The information of parameters is stored to the array of IODBPRM structure. If an invalid parameter number is specified, the type field of the IODBPRM structure is -1. In case of non-axis type parameter, the parameter value is stored to the data[0] of the IODBPRM structure. And, in case of axis-type parameter, the parameter value is stored to the data array of the structure. All parameter values are stored to long type. So your application have to cast them according to the type information. See the "PARAMETER MANUAL" of CNC for details of each parameter. The spindle parameters have an axis attribute, and the data for number of spindle are valid.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdparam_ext(unsigned short FlibHndl, long *prm_no, short num, IODBPRM *param);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| prm_no | in |
Specify the pointer to the array of the parameter numbers. See the "PARAMETER MANUAL" of CNC about available parameter number. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| num | in |
Specify the number of the parameters to be read. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| param | out |
Specify the pointer to the array of IODBPRM structure to store the parameters. The number of array must be equal to "num". The IODBPRM structure is as follows.
typedef struct iodbprm {
long datano; /* parameter number */
short type; /* type information */
short axis; /* axis information */
short info; /* attribute */
short unit; /* unit */
struct {
long prm_val; /* parameter value */
long dec_val; /* place of decimal point */
} data[32];
} IODBPRM;
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
The number of parameters (num) is 0 or less. |
| EW_PASSWD |
( Series 16i/18i/21i, 0i-A/B/C ) |
ncdata\cnc_rdparanum
Reads minimum, maximum, total number of the CNC parameter. The distribution of the parameter is different in each CNC model, and the new parameter may be added because of the expansion of the CNC function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdparanum(unsigned short FlibHndl, ODBPARANUM *paranum);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| paranum | out |
Pointer to the ODBPARANUM structure including the minimum, maximum, total number of the parameter. The ODBPARANUM structure is as follows.
typedef struct odbparanum {
unsigned short para_min ; /* minimum number of parameter */
unsigned short para_max ; /* maximum number of parameter */
unsigned short total_no ; /* total number of parameter */
} ODBPARANUM ;
|
ERRORS
| Code | Description |
|---|
ncdata\cnc_rdparar
Reads the parameter specified by "*s_number","*e_number","axis"(only for the parameter with axis). The data format depends on each parameter. The format of Byte/Word/2-Word parameter is generally signed binary. Reads the parameter for all axes specified range by specifying 'ALL_AXES' in 'axis'. The attribute of CNC parameter depends on the type and axis, and it is
different for each parameter. It is as follows, and can be got by
cnc_rdparainfo function. It is impossible to read any bit parameter bit by bit. 8 bits(i.e. 1 byte) which belong to the same parameter number are read at the same time. See the "PARAMETER MANUAL" of CNC for details of each parameter.
Parameter type
Meaning
Byte size
Bit parameter
Every bits have each definition.
1
Bit parameter with axis
Every bits have each definition. (each axis)
1
Byte parameter
1-byte data is stored.
1
Byte parameter with axis
1-byte data is stored. (each axis)
1
Word parameter
2-byte data is stored.
2
Word parameter with axis
2-byte data is stored. (each axis)
2
2-Word parameter
4-byte data is stored.
4
2-Word parameter with axis
4-byte data is stored. (each axis)
4
Real parameter
(Series 15i, 30i, 0i-D/F, PMi-A)
4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored.
8
Real parameter with axis
(Series 15i, 30i, 0i-D/F, PMi-A)
4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored. (each axis)
8
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdparar(unsigned short FlibHndl, short *s_number, short axis, short *e_number, short *length, void *param);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||
| s_number | in/out |
Specify the start parameter number. See the "PARAMETER MANUAL" of CNC about available parameter number. It can be got by cnc_rdparanum function and cnc_rdparainfo function. |
||||||||||||||||||||||||
| e_number | in/out |
Specify the end parameter number. The new parameter may be added according to updating CNC software, addition of the new function, etc. If the new parameter is added within reading range, the error(Return: EW_LENGTH) may be returned or the application program may not work correctly. In order to avoid these problems, specify only the continuous numbers of existing parameters as the reading range. |
||||||||||||||||||||||||
| axis | in |
Specify the axis number.
None axis type parameter can be read even if any value is specified in "axis". In case that an axis type parameter exists in the specified range, the error(Return:EW_ATTRIB) is returned by specifying "axis=0". |
||||||||||||||||||||||||
| length | in/out |
Specify the data block length which is enough to store the specified parameter. The structure per 1 parameter is as follows, and each parameter is lined up in order of number. [= 4+(byte size of each parameter)*(number of axis)] Because the size which was read actually is returned, it is possible to specify the length more than the actual size. In case that the size of parameter is 2 byte, the IODBPSD structure is as follows. In case that the size of parameter is 1 or 2 byte and the length per 1 parameter is not a multiple of 4, 'dummy' is necessary at the end of structure. In case that its size is 4 or 8 byte, the size of data part per 1 parameter or 1 axis is 4 or 8 byte, and so 'dummy' is not necessary. IODBPSD
n = Maximum controlled axes In case of Series 15i, 16/18/21, 16i/18i/21i, 0i, 30i, Power Mate i and PMi-A, the spindle parameters have an axis attribute, and the data for number of spindle are valid. |
||||||||||||||||||||||||
| param | out |
Pointer to the area to store the parameters.
Series 15, 16/18/21, 16i/18i/21i, 0i-A/B and Power Mate i
typedef struct iodbpsd {
short datano; /* parameter number */
short type; /* upper byte:type */
/* lower byte:axis */
union {
char cdata; /* bit/byte parameter */
short idata; /* word parameter */
long ldata; /* 2-word parameter */
char cdatas[MAX_AXIS]; /* bit/byte parameter with axis*/
short idatas[MAX_AXIS]; /* word parameter with axis */
long ldatas[MAX_AXIS]; /* 2-word parameter with axis */
} u ;
} IODBPSD ; /* MAX_AXIS : max. controlled axes */
Series 15i, 30i, 0i-D/F, PMi-A and Ethernet connection
typedef struct realprm { /* real parameter */
long prm_val; /* value of variable */
long dec_val; /* number of places of decimals */
} REALPRM;
typedef struct iodbpsd {
short datano; /* parameter number */
short type; /* upper byte:type */
/* lower byte:axis */
union {
char cdata; /* bit/byte parameter */
short idata; /* word parameter */
long ldata; /* 2-word parameter */
REALPRM rdata; /* real parameter */
char cdatas[MAX_AXIS];/*bit/byte parameter with axis*/
short idatas[MAX_AXIS];/* word parameter with axis */
long ldatas[MAX_AXIS];/* 2-word parameter with axis */
REALPRM rdatas[MAX_AXIS];/* real parameter with axis */
} u;
} IODBPSD ; /* MAX_AXIS : max. controlled axes */
|
||||||||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||
| s_number | in/out |
Specify the start parameter number. See the "PARAMETER MANUAL" of CNC about available parameter number. It can be got by cnc_rdparanum function and cnc_rdparainfo function. |
||||||||||||||||||||||||
| e_number | in/out |
Specify the end parameter number. The new parameter may be added according to updating CNC software, addition of the new function, etc. If the new parameter is added within reading range, the error(Return:EW_LENGTH) may be returned or the application program may not work correctly. In order to avoid these problems, specify only the continuous numbers of existing parameters as the reading range. |
||||||||||||||||||||||||
| axis | in |
Specify the axis number.
None axis type parameter can be read even if any value is specified in "axis". In case that an axis type parameter exists in the specified range, the error(Return:EW_ATTRIB) is returned by specifying "axis=0". |
||||||||||||||||||||||||
| length | in/out |
Specify the data block length which is enough to store the specified parameter. The structure per 1 parameter is as follows, and each parameter is lined up in order of number. [= 4+(byte size of each parameter)*(number of axis)] Because the size which was read actually is returned, it is possible to specify the length more than the actual size. In case that the size of parameter is 2 byte, the IODBPSD structure is as follows. In case that the size of parameter is 1 or 2 byte and the length per 1 parameter is not a multiple of 4, 'dummy' is necessary at the end of structure. In case that its size is 4 or 8 byte, the size of data part per 1 parameter or 1 axis is 4 or 8 byte, and so 'dummy' is not necessary. IODBPSD
The spindle parameters have an axis attribute, and the data for number of spindle are valid. |
||||||||||||||||||||||||
| param | out |
Pointer to the area to store the parameters.
typedef struct realprm { /* real parameter */
long prm_val; /* value of variable */
long dec_val; /* number of places of decimals */
} REALPRM;
typedef struct iodbpsd {
short datano; /* parameter number */
short type; /* upper byte:type */
/* lower byte:axis */
union {
char cdata; /* bit/byte parameter */
short idata; /* word parameter */
long ldata; /* 2-word parameter */
REALPRM rdata; /* real parameter */
char cdatas[MAX_AXIS];/*bit/byte parameter with axis*/
short idatas[MAX_AXIS];/* word parameter with axis */
long ldatas[MAX_AXIS];/* 2-word parameter with axis */
REALPRM rdatas[MAX_AXIS];/* real parameter with axis */
} u;
} IODBPSD ; /* MAX_AXIS : max. controlled axes */
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of area to store parameter(length) is wrong. |
| EW_NUMBER |
Parameter number(s_number,e_number) is wrong. |
| EW_ATTRIB |
Axis number(axis) is wrong. |
| EW_PASSWD |
( Series 16i/18i/21i, 0i-A/B/C ) |
ncdata\cnc_rdpitchinfo
Reads the available number of pitch error compensation data. It is stored in "*use_no" with signed binary format. In case of Series 16i/18i-W, the data is stored in the array, use_no[8].
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdpitchinfo(unsigned short FlibHndl, short* use_no);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||
| use_no | out |
Pointer to the available number of pitch error compensation data
|
||||||||||||||||||||||||||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||
| use_no | out |
Pointer to the available number of pitch error compensation data In case of bi-directional pitch error compensation, the available number is twice. |
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
This function needs the pitch error compensation option. |
ncdata\cnc_rdpitchr
Reads the pitch error compensation data specified by "s_number", "e_number". The data is stored in "data" array of "IODBPI" with signed binary format.
Available range of data
:
-7,..,7
Available range of data
:
-128,..,127
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdpitchr(unsigned short FlibHndl, short s_number, short e_number, short length, IODBPI *pitch);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| s_number | in |
Specify the start number of the pitch error compensation data. |
| e_number | in |
Specify the end number of the pitch error compensation data. |
| length | in |
Specify the data block length (size of IODBPI structure). 6+(number of pitch error compensation data) IODBPI
N : Number of pitch error compensation data |
| pitch | out |
Pointer to the IODBPI structure including the pitch error compensation data. The IODBPI structure is as follows.
typedef struct iodbpi {
short datano_s; /* start number of pitch error data */
short dummy; /* (not used) */
short datano_e; /* end number of pitch error data */
char data[N]; /* pitch error compensation data */
} IODBPI ; /* N : number of pitch error data */
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of IODBPI structure(length) is wrong. |
| EW_NUMBER |
Pitch error compensation data number(s_number, e_number) is wrong. |
| EW_NOOPT |
This function needs the pitch error compensation option. |
ncdata\cnc_rdpmacro
Reads the P code macro variable (variable for the macro-executor) specified by "number". The data is stored in "ODBPM" with signed binary format. It is possible to exchange the type of P code macro variable by cnc_setpmactype function. In case of the integer type variable, this indication is invalid and always regarded as the decimal form floating-point type. mcr_val always returns by nine digits and adjusts the amount with the value of dec_val. The value of an undefined variable is called "vacant", and it is expressed as follows both at decimal form floating-point type and at binary form floating-point type. mcr_val = 0 See the "PROGRAMING MANUAL" of the macro-executor for details of the P code macro variable.
mcr_val
:
value of variable (=M)
4-byte binary data with sign
(available range:999999999,..,-999999999, integer type:-32768,..,32767)
dec_val
:
number of places of decimals (=E)
2-byte binary data with sign
(available range:-128,..,127, integer type : 0)
Example: When the variable value is 12.345, mcr_val and dec_val are read as follows.
mcr_val = 123450000
dec_val = 7
mcr_val
:
numerical part of variable (=M)
4-byte binary data with sign
(available range:No limitation)
dec_val
:
exponent part of variable (=E)
2-byte binary data with sign
(available range:-128,..,127)
dec_val = -1
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdpmacro(unsigned short FlibHndl, long number, ODBPM *pmacro);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| number | in |
Specify the P code macro variable number. See the description of cnc_rdpmacroinfo function about the available range. |
| pmacro | out |
Pointer to the ODBPM structure including the P code macro variable. The ODBPM structure is as follows.
typedef struct odbpm {
long datano ; /* P code macro variable number */
short dummy ; /* (not used) */
long mcr_val ; /* value of P code macro */
short dec_val ; /* number of places of decimals */
} ODBPM ;
|
ERRORS
| Code | Description |
|---|---|
| EW_NUMBER |
P code macro variable number(number) is wrong. |
| EW_NOOPT |
This function needs the macro-executor option. |
| EW_PASSWD |
( Series 16i/18i/21i, 0i-A/B/C ) |
ncdata\cnc_rdpmacroinfo
Reads the available number of the P code macro variables (variable for the macro-executor) and the type of it. Those are stored in "ODBPMINF" with signed binary format.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdpmacroinfo(unsigned short FlibHndl, ODBPMINF *pminf);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||
| pminf | out |
Pointer to the ODBPMINF structure including the P code macro variable information. The ODBPMINF structure is as follows. The following parameters are not the CNC parameter, but the compile parameter of the macro-compiler. See the "PROGRAMING MANUAL" of the macro-executor for details of the compile parameter. Please specify "PCD_UWORD" for "-D" option when compiling, if the number of variables whose number is 40,000 or greater for Series 15, or 20,000 or greater for Series 16/18/21, 16i/18i/21i, 0i, Power Mate i exceeds 32767.
typedef struct odbpminf {
short use_no1; /* number of variables(30000,...) */
#ifdef PCD_UWORD /* When the number of variables whose number is 40,000
or greater exceeds 32767 */
unsigned short use_no2;
/* number of variables(40000,...) */
#else
short use_no2; /* number of variables(40000,...) */
#endif
short v2_type1;/* type of variables(30000,...) */
short v2_type2;/* type of variables(40000,...) */
} ODBPMINF;
typedef struct odbpminf {
short use_no1; /* number of variables(10000,...) */
#ifdef PCD_UWORD /* When the number of variables whose number is 20,000
or greater exceeds 32767 */
unsigned short use_no2;
/* number of variables(20000,...) */
#else
short use_no2; /* number of variables(20000,...) */
#endif
short v2_type; /* type of variables(20000,...) */
} ODBPMINF;
typedef struct odbpminf {
short use_no1; /* number of variables(10000,...) */
#ifdef PCD_UWORD /* When the number of variables whose number is 20,000
or greater exceeds 32767 */
unsigned short use_no2;
/* number of variables(20000,...) */
#else
short use_no2; /* number of variables(20000,...) */
#endif
short v2_type; /* type of variables(20000,...) */
} ODBPMINF;
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
This function needs the macro-executor option. |
ncdata\cnc_rdpmacroinfo2
Reads the available number of the P code macro variables (variable for the macro-executor) and the type of it. Those are stored in "ODBPMINF2" with signed binary format. When the variable for a conversation macro and a high-speed cycle is coexistent, the information for variable of 20,000 or later cannot be acquired with cnc_rdpmacroinfo. So, please use this function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdpmacroinfo2(unsigned short FlibHndl, ODBPMINF2 *pminf2);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||
| pminf | out |
Pointer to the ODBPMINF2 structure including the P code macro variable information. The ODBPMINF2 structure is as follows. The following parameters are not the CNC parameter, but the compile parameter of the macro-compiler. See the "PROGRAMING MANUAL" of the macro-executor for details of the compile parameter.
typedef struct odbpminf2 {
long use_no1; /* number of variables(10000,...) */
long use_no2; /* number of variables(20000,...) */
long use_no20; /* number of high-speed cycle variables */
short v1_type; /* type of variables(10000,...) */
short v2_type; /* type of variables(20000,...) */
short v20_type; /* type of high-speed cycle variables */
} ODBPMINF2;
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
This function needs the macro-executor option. |
ncdata\cnc_rdpmacror
Reads the P code macro variables(variable for the macro-executor)
specified by "s_number", "e_number". The data is stored in "IODBPR"
with signed binary format. It is possible to exchange the type of P code macro variable by cnc_setpmactype function. In case of the integer type variable, this indication is invalid and always regarded as the decimal form floating-point type. mcr_val always returns by nine digits and adjusts the amount with the value of dec_val. The value of an undefined variable is called "vacant", and it is expressed as follows both at decimal form floating-point type and at binary form floating-point type. mcr_val = 0 See the "PROGRAMING MANUAL" of the macro-executor for details of the P code macro variable.
mcr_val
:
value of variable (=M)
4-byte binary data with sign
(available range:999999999,..,-999999999, integer type:-32768,..,32767)
dec_val
:
number of places of decimals (=E)
2-byte binary data with sign
(available range:-128,..,127, integer type : 0)
Example: When the variable value is 12.345, mcr_val and dec_val are read as follows.
mcr_val = 123450000
dec_val = 7
mcr_val
:
numerical part of variable (=M)
4-byte binary data with sign
(available range:No limitation)
dec_val
:
exponent part of variable (=E)
2-byte binary data with sign
(available range:-128,..,127)
dec_val = -1
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdpmacror(unsigned short FlibHndl, long s_number, long e_number, unsigned short length, IODBPR *pmacror);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| s_number | in |
Specify the start P code macro variable number. See the description of cnc_rdpmacroinfo function about the available range. |
| e_number | in |
Specify the end P code macro variable number. |
| length | in |
Specify the data block length (size of IODBPR structure). 12+8*(Number of P code macro variable) IODBPR
N : Number of P code macro variable |
| pmacror | out |
Pointer to the IODBPR structure including the P code macro variable. The IODBPR structure is as follows.
typedef struct iodbpr {
long datano_s; /* start P code macro variable number*/
short dummy; /* (not used) */
long datano_e; /* end P code macro variable number */
struct {
long mcr_val; /* value of P code macro */
short dec_val; /* number of places of decimals */
} data[N]; /* N:Number of P code macro variable */
} IODBPR;
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of IODBPR structure(length) is wrong. |
| EW_NUMBER |
P code macro variable number(s_number, e_number) is wrong. |
| EW_NOOPT |
This function needs the macro-executor option. |
| EW_PASSWD |
( Series 16i/18i/21i, 0i-A/B/C ) |
ncdata\cnc_rdpmacror2
Reads the P code macro variables(variables for the macro-executor) specified by the starting number, "stnum", and number of variables, "*num". The data is stored in "mcval" with double format. It is not influenced by setting of cnc_setpmactype function. The value of an undefined variable is called "vacant", and it is expressed as follows. 0xFFFFFFFFFFFFFFFF See the "PROGRAMING MANUAL" of the macro-executor for details of the P code macro variable.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdpmacror2( unsigned short FlibHndl, unsigned long stnum, unsigned long *num, unsigned short type, double *mcval);
ARGUMENTS
| Name | Direction | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||
| stnum | in |
Specify the starting P code macro variable number. |
|||||||||
| num | in |
Specify the number of P code macro variables to be read. |
|||||||||
| type | in |
|
|||||||||
| mcval | out |
Specify the array for read P code macro variables. |
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
The number of P code macro variables(*num) is 0 or less. |
| EW_NUMBER |
P code macro variable number(stnum) is wrong. |
| EW_ATTRIB |
Type of P code macro variables(type) is wrong. |
| EW_NOOPT |
This function needs the macro-executor option. |
ncdata\cnc_rdrotvolc
Read the 3-dimensional rotary error compensation data by specified range.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdrotvolc( unsigned short FlibHndl, long start_no, long *num, IODBROTVOLC *rot_data );
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| start_no | in |
Specify the compensation number which the reading start. The range is 1-7812. |
| num | in/out |
Specify the reading number. The range is 1-13. |
| rot_data | out |
Pointer to the area to store the 3-dimensional rotary error compensation data.
typedef struct iodbrotvolc {
long lin[3] ; /* translational errors[Cx,Cy,Cz] */
long rot[3] ; /* rotary errors[Cα,Cβ,Cγ] */
} IODBROTVOLC ;
It is necessary to allocate the size of [num * sizeof(iodbrotvolc)] byte for "rot_data". For example, when 2 data from No.5 is acquired, the acquired data becomes as follows. ODBROTVOLC *rot_data ; start_no = 5; num = 2; The 3-dimensional rotary error compensation data is stored as follows. rot_data[0]->lin[0] Translational error compensation data of 1st axis in No.5. rot_data[0]->lin[1] Translational error compensation data of 2nd axis in No.5. rot_data[0]->lin[2] Translational error compensation data of 3rd axis in No.5. rot_data[0]->rot[0] Rotary error compensation data of 1st axis in No.5. rot_data[0]->rot[1] Rotary error compensation data of 2nd axis in No.5. rot_data[0]->rot[2] Rotary error compensation data of 3rd axis in No.5. rot_data[1]->lin[0] Translational error compensation data of 1st axis in No.6. rot_data[1]->lin[1] Translational error compensation data of 2nd axis in No.6. rot_data[1]->lin[2] Translational error compensation data of 3rd axis in No.6. rot_data[1]->rot[0] Rotary error compensation data of 1st axis in No.6. rot_data[1]->rot[1] Rotary error compensation data of 2nd axis in No.6. rot_data[1]->rot[2] Rotary error compensation data of 3rd axis in No.6. |
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_DATA |
In order to get more information for this return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
||||||
| EW_NOOPT |
This function needs the 3-dimensional rotary error compensation and the extended driver/library function option. |
ncdata\cnc_rdrstrmcode
Reads specified number of executing or executed M codes, starting from the M code group with specified number.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdrstrmcode(unsigned short FlibHndl, short s_no, short *num, ODBRSTRM *buf);
ARGUMENTS
| Name | Direction | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||
| s_no | in |
Specify M code group number. |
|||||||||
| num | in / out |
Pointer to the number of M code groups to be read. |
|||||||||
| buf | out |
Pointer to the ODBRSTRM structure where returned data are stored. The ODBRSTRM structure is as follows.
typedef struct odbrstrm {
short grp_no;
short mem_no;
struct{
long no;
short flag;
}m_code[5];
} ODBRSTRM;
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
The number indication(num) is wrong. |
| EW_NUMBER |
The start number(s_no) is wrong. |
| EW_NOOPT |
The M code group option, the program restart option and the extended driver/library function are necessary. |
ncdata\cnc_rdset
Reads the setting data specified by "number","axis"(only for the setting data with axis). The data format depends on each setting data. The format of Byte/Word/2-Word setting data is generally signed binary. Reads the setting data for all axes once by specifying 'ALL_AXES' in 'axis'. The setting data for each axis is stored in each array of "IODBPSD". The attribute of setting data depends on the type and axis, and it is different for each setting data. It is as follows, and can be got by cnc_rdsetinfo function. It is impossible to read any bit setting data bit by bit. 8 bits(i.e. 1 byte) which belong to the same setting data number are read at the same time. This function is the same as cnc_rdparam function except that it cannot read the parameter without setting attribute. See the "PARAMETER MANUAL" of CNC for details of each setting data.
Setting data type
Meaning
Byte size
Bit setting data
Every bits have each definition.
1
Bit setting data with axis
Every bits have each definition. (each axis)
1
Byte setting data
1-byte data is stored.
1
Byte setting data with axis
1-byte data is stored. (each axis)
1
Word setting data
2-byte data is stored.
2
Word setting data with axis
2-byte data is stored. (each axis)
2
2-Word setting data
4-byte data is stored.
4
2-Word setting data with axis
4-byte data is stored. (each axis)
4
Real setting data
(Series 15i, 30i, 0i-D/F, PMi-A)
4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored.
8
Real setting data with axis
(Series 15i, 30i, 0i-D/F, PMi-A)
4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored. (each axis)
8
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdset(unsigned short FlibHndl, short number, short axis, short length, IODBPSD *set);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||
| number | in |
Specify the setting data number. |
||||||||||||||||||||||||
| axis | in |
Specify the axis number.
|
||||||||||||||||||||||||
| length | in |
Specify the data block length(size of IODBPSD structure). 4+(byte size of setting data)*(number of axis) In case that the size of setting data is 4 byte, the IODBPSD structure is as follows. In case that its size is 1, 2, or 8 byte, the size of data part per 1 setting data or 1 axis is 1, 2, or 8 byte. IODBPSD
n = Maximum controlled axes
n = Current controlled axes In case of Series 15i, 16/18/21, 16i/18i/21i, 0i, 30i, Power Mate i and PMi-A, the spindle setting data has an axis attribute, and the data for number of spindle are valid. |
||||||||||||||||||||||||
| set | out |
Pointer to the IODBPSD structure including the setting data. The IODBPSD structure is as follows.
Series 15, 16/18/21, 16i/18i/21i, 0i-A/B and Power Mate i
typedef struct iodbpsd {
short datano; /* setting data number */
short type; /* upper byte:type */
/* lower byte:axis */
union {
char cdata; /* bit/byte setting data */
short idata; /* word setting data */
long ldata; /* 2-word setting data */
char cdatas[MAX_AXIS]; /* bit/byte set. data with axis*/
short idatas[MAX_AXIS]; /* word setting data with axis */
long ldatas[MAX_AXIS]; /* 2-word set. data with axis */
} u ;
} IODBPSD ; /* MAX_AXIS : max. controlled axes */
Series 15i, 30i, 0i-D/F, PMi-A and Ethernet connection
typedef struct realprm { /* real setteing data */
long prm_val; /* value of variable */
long dec_val; /* number of places of decimals */
} REALPRM;
typedef struct iodbpsd {
short datano; /* setting data number */
short type; /* upper byte:type */
/* lower byte:axis */
union {
char cdata; /* bit/byte setting data */
short idata; /* word setting data */
long ldata; /* 2-word setting data */
REALPRM rdata; /* real setting data */
char cdatas[MAX_AXIS];/*bit/byte set. data with axis*/
short idatas[MAX_AXIS];/* word set. data with axis */
long ldatas[MAX_AXIS];/* 2-word set. data with axis */
REALPRM rdatas[MAX_AXIS];/* real set. data with axis */
} u;
} IODBPSD ; /* MAX_AXIS : max. controlled axes */
|
||||||||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||
| number | in |
Specify the setting data number. |
||||||||||||||||||||||||
| axis | in |
Specify the axis number.
|
||||||||||||||||||||||||
| length | in |
Specify the data block length(size of IODBPSD structure). 4+(byte size of setting data)*(number of axis) In case that the size of setting data is 4 byte, the IODBPSD structure is as follows. In case that its size is 1, 2, or 8 byte, the size of data part per 1 setting data or 1 axis is 1, 2, or 8 byte. IODBPSD
The spindle setting data has an axis attribute, and the data for number of spindle are valid. |
||||||||||||||||||||||||
| set | out |
Pointer to the IODBPSD structure including the setting data. The IODBPSD structure is as follows.
typedef struct realprm { /* real setteing data */
long prm_val; /* value of variable */
long dec_val; /* number of places of decimals */
} REALPRM;
typedef struct iodbpsd {
short datano; /* setting data number */
short type; /* axis */
union {
char cdata; /* bit/byte setting data */
short idata; /* word setting data */
long ldata; /* 2-word setting data */
REALPRM rdata; /* real setting data */
char cdatas[MAX_AXIS];/*bit/byte set. data with axis*/
short idatas[MAX_AXIS];/* word set. data with axis */
long ldatas[MAX_AXIS];/* 2-word set. data with axis */
REALPRM rdatas[MAX_AXIS];/* real set. data with axis */
} u;
} IODBPSD ; /* MAX_AXIS : max. controlled axes */
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of IODBPSD structure(length) is wrong. |
| EW_NUMBER |
Setting data number(number) is wrong. |
| EW_ATTRIB |
Axis number(axis) is wrong. |
ncdata\cnc_rdsetinfo
Reads the CNC setting data information specified by "s_number" and "read_no". The CNC setting data is basically non-continuous, and the attribute like the type and the size, etc. is different at each number. Use this function for the purpose such as displaying the setting data.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdsetinfo(unsigned short FlibHndl, short s_number, unsigned short read_no, ODBSETIF *setif);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| s_number | in |
Specify the start setting data number. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| read_no | in |
Specify the number of the setting data information to be read. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| setif | out |
Pointer to the ODBSETIF structure including the setting data information. The ODBSETIF structure is as follows.
typedef struct odbsetif {
unsigned short info_no ; /* number of setting data information */
short prev_no ; /* previous setting data number */
short next_no ; /* next setting data number */
struct {
short set_no ; /* setting data number */
short set_type ; /* attribute of setting data */
} info[N] ; /* N is number of setting data information */
} ODBSETIF ;
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| s_number | in |
Specify the start setting data number. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| read_no | in |
Specify the number of the setting data information to be read. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| setif | out |
Pointer to the ODBSETIF structure including the setting data information. The ODBSETIF structure is as follows.
typedef struct odbsetif {
unsigned short info_no ; /* number of setting data information */
short prev_no ; /* previous setting data number */
short next_no ; /* next setting data number */
struct {
short set_no ; /* setting data number */
short set_type ; /* attribute of setting data */
} info[N] ; /* N is number of setting data information */
} ODBSETIF ;
|
ERRORS
| Code | Description |
|---|---|
| EW_NUMBER |
Start setting data number (s_number) is wrong. |
ncdata\cnc_rdsetnum
Reads minimum, maximum, total number of the CNC setting data. The distribution of the setting data is different in each CNC model, and the new setting data may be added because of the expansion of the CNC function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdsetnum(unsigned short FlibHndl, ODBSETNUM *setnum);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| setnum | out |
Pointer to the ODBSETNUM structure including the minimum, maximum, total number of the setting data. The ODBSETNUM structure is as follows.
typedef struct odbsetnum {
unsigned short set_min ; /* minimum number of setting data */
unsigned short set_max ; /* maximum number of setting data */
unsigned short total_no ; /* total number of setting data */
} ODBSETNUM ;
|
ERRORS
| Code | Description |
|---|
ncdata\cnc_rdsetr
Reads the setting data specified by "s_number","e_number","axis"(only
for the setting data with axis). The data format depends on each
setting data. The format of Byte/Word/2-Word setting data is generally
signed binary. Reads the setting data for all axes specified range by specifying
'ALL_AXES' in 'axis'. The attribute of setting data depends on the type and axis, and it is
different for each setting data. It is as follows, and can be got by cnc_rdsetinfo function. It is impossible to read any bit setting data bit by bit. 8 bits(i.e. 1 byte) which belong to the same setting data number are read at the same time. This function is the same as cnc_rdparar function except that it cannot read the parameter without setting attribute. See the "PARAMETER MANUAL" of CNC for details of each setting data.
Setting data type
Meaning
Byte size
Bit setting data
Every bits have each definition.
1
Bit setting data with axis
Every bits have each definition. (each axis)
1
Byte setting data
1-byte data is stored.
1
Byte setting data with axis
1-byte data is stored. (each axis)
1
Word setting data
2-byte data is stored.
2
Word setting data with axis
2-byte data is stored. (each axis)
2
2-Word setting data
4-byte data is stored.
4
2-Word setting data with axis
4-byte data is stored. (each axis)
4
Real setting data
(only Series 15i, 30i, 0i-D/F, PMi-A)
4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored.
8
Real setting data with axis
(only Series 15i, 30i, 0i-D/F, PMi-A)
4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored. (each axis)
8
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdsetr(unsigned short FlibHndl, short *s_number, short axis, short *e_number, short *length, void *set);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||
| s_number | in/out |
Specify the start setting data number. The setting data number which was read first is returned. See the "PARAMETER MANUAL" of CNC about available setting data number. It can be got by cnc_rdsetnum function and cnc_rdsetinfo function. |
||||||||||||||||||||||||
| e_number | in/out |
Specify the end setting data number. The new setting data may be added according to updating CNC software, addition of the new function, etc. If the new setting data is added within reading range, the error(Return: EW_LENGTH) may be returned or the application program may not work correctly. In order to avoid these problems, specify the continuous numbers of existing setting data as the reading range. |
||||||||||||||||||||||||
| axis | in |
Specify the axis number.
None axis type setting data can be read even if any value is specified in "axis". In case that an axis type setting data exists in the specified range, the error(Return:EW_ATTRIB) is returned by specifying "axis=0". |
||||||||||||||||||||||||
| length | in/out |
Specify the data block length which is enough to store the specified setting data. The structure per 1 setting data is as follows, and each setting data is lined up in order of number. [= Sum of (4+(byte size of each setting data) *(number of axis))] Because the size which was read actually is returned, it is possible to specify the length more than the actual size. In case that the size of setting data is 2 byte, the IODBPSD structure is as follows. In case that the size of setting data is 1 or 2 byte and the length per 1 setting data is not a multiple of 4, 'dummy' is necessary at the end of structure. In case that its size is 4 or 8 byte, the size of data part per 1 setting data or 1 axis is 4 or 8 byte, and so 'dummy' is not necessary. IODBPSD
n = Maximum controlled axes In case of Series 15i, 16/18/21, 16i/18i/21i, 0i, 30i, Power Mate i and PMi-A, the spindle setting data has an axis attribute, and the data for number of spindle are valid. |
||||||||||||||||||||||||
| set | out |
Pointer to the area to store the setting data.
Series 15, 16/18/21, 16i/18i/21i, 0i-A/B and Power Mate i
typedef struct iodbpsd {
short datano; /* setting data number */
short type; /* upper byte:type */
/* lower byte:axis */
union {
char cdata; /* bit/byte setting data */
short idata; /* word setting data */
long ldata; /* 2-word setting data */
char cdatas[MAX_AXIS]; /* bit/byte set. data with axis*/
short idatas[MAX_AXIS]; /* word setting data with axis*/
long ldatas[MAX_AXIS]; /* 2-word set. data with axis */
} u ;
} IODBPSD ; /* MAX_AXIS : max. controlled axes */
Series 15i, 30i, 0i-D/F, PMi-A and Ethernet connection
typedef struct realprm { /* real setting data */
long prm_val; /* value of variable */
long dec_val; /* number of places of decimals */
} REALPRM;
typedef struct iodbpsd {
short datano; /* setting data number */
short type; /* upper byte:type */
/* lower byte:axis */
union {
char cdata; /* bit/byte setting data */
short idata; /* word setting data */
long ldata; /* 2-word setting data */
REALPRM rdata; /* real setting data */
char cdatas[MAX_AXIS];/*bit/byte set. data with axis*/
short idatas[MAX_AXIS];/* word set. data with axis */
long ldatas[MAX_AXIS];/* 2-word set. data with axis */
REALPRM rdatas[MAX_AXIS];/* real set. data with axis */
} u;
} IODBPSD ; /* MAX_AXIS : max. controlled axes */
|
||||||||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||
| s_number | in/out |
Specify the start setting data number. The setting data number which was read first is returned. See the "PARAMETER MANUAL" of CNC about available setting data number. It can be got by cnc_rdsetnum function and cnc_rdsetinfo function. |
||||||||||||||||||||||||
| e_number | in/out |
Specify the end setting data number. The new setting data may be added according to updating CNC software, addition of the new function, etc. If the new setting data is added within reading range, the error(Return: EW_LENGTH) may be returned or the application program may not work correctly. In order to avoid these problems, specify the continuous numbers of existing setting data as the reading range. |
||||||||||||||||||||||||
| axis | in |
Specify the axis number.
None axis type setting data can be read even if any value is specified in "axis". In case that an axis type setting data exists in the specified range, the error(Return:EW_ATTRIB) is returned by specifying "axis=0". |
||||||||||||||||||||||||
| length | in/out |
Specify the data block length which is enough to store the specified setting data. The structure per 1 setting data is as follows, and each setting data is lined up in order of number. [= Sum of (4+(byte size of each setting data) *(number of axis))] Because the size which was read actually is returned, it is possible to specify the length more than the actual size. In case that the size of setting data is 2 byte, the IODBPSD structure is as follows. In case that the size of setting data is 1 or 2 byte and the length per 1 setting data is not a multiple of 4, 'dummy' is necessary at the end of structure. In case that its size is 4 or 8 byte, the size of data part per 1 setting data or 1 axis is 4 or 8 byte, and so 'dummy' is not necessary. IODBPSD
The spindle setting data has an axis attribute, and the data for number of spindle are valid. |
||||||||||||||||||||||||
| set | out |
Pointer to the area to store the setting data.
typedef struct realprm { /* real setting data */
long prm_val; /* value of variable */
long dec_val; /* number of places of decimals */
} REALPRM;
typedef struct iodbpsd {
short datano; /* setting data number */
short type; /* upper byte:type */
/* lower byte:axis */
union {
char cdata; /* bit/byte setting data */
short idata; /* word setting data */
long ldata; /* 2-word setting data */
REALPRM rdata; /* real setting data */
char cdatas[MAX_AXIS];/*bit/byte set. data with axis*/
short idatas[MAX_AXIS];/* word set. data with axis */
long ldatas[MAX_AXIS];/* 2-word set. data with axis */
REALPRM rdatas[MAX_AXIS];/* real set. data with axis */
} u;
} IODBPSD ; /* MAX_AXIS : max. controlled axes */
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of area to store setting data(length) is wrong. |
| EW_NUMBER |
Setting data number(s_number, e_number) is wrong. |
| EW_ATTRIB |
Axis number(axis) is wrong. |
ncdata\cnc_rdtofs
Reads the tool offset value specified by "number", "type".
The offset value is stored in "data" of "ODBTOFS" with signed binary format.
The unit of offset value is as follows.
6007#0
(ONM)6004#0
(OUF)6002#1
(OFN)6002#0
(ORG)Linear axis
mm input
[mm]Linear axis
inch input
[inch]Rotation axis
[deg]
0
0
0
1
0.01
0.001
0.01
0
0
0
0
0.001
0.0001
0.001
0
0
1
0
0.0001
0.00001
0.0001
0
1
0
0
0.00001
0.000001
0.00001
1
0
0
0
0.000001
0.0000001
0.000001
6007#0
(OFE)6004#0
(OFD)6002#1
(OFC)6002#0
(OFA)Linear axis
mm input
[mm]Linear axis
inch input
[inch]Rotation axis
[deg]
0
0
0
1
0.01
0.001
0.01
0
0
0
0
0.001
0.0001
0.001
0
0
1
0
0.0001
0.00001
0.0001
0
1
0
0
0.00001
0.000001
0.00001
1
0
0
0
0.000001
0.0000001
0.000001
IS-A is effective for Power Mate i-H.
1004#1
(ISC)1004#0
(ISA)Linear axis
mm input
[mm]Linear axis
inch input
[inch]Rotation axis
[deg]
IS-A
0
1
0.01
0.001
0.01
IS-B
0
0
0.001
0.0001
0.001
IS-C
1
0
0.0001
0.00001
0.0001
IS-C is effective for Power Mate i-D.
5042#1
(OFC)5042#0
(OFA)Linear axis
mm input
[mm]Linear axis
inch input
[inch]Rotation axis
[deg]
0
1
0.01
0.001
0.01
0
0
0.001
0.0001
0.001
1
0
0.0001
0.00001
0.0001
5042#3
(OFE)5042#2
(OFD)5042#1
(OFC)5042#0
(OFA)Linear axis
mm input
[mm]Linear axis
inch input
[inch]Rotation axis
[deg]
0
0
0
1
0.01
0.001
0.01
0
0
0
0
0.001
0.0001
0.001
0
0
1
0
0.0001
0.00001
0.0001
0
1
0
0
0.00001
0.000001
0.00001
1
0
0
0
0.000001
0.0000001
0.000001
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdtofs(unsigned short FlibHndl, short number, short type, short length, ODBTOFS *tofs);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| number | in |
Specify the tool offset number. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type | in |
Specify the tool offset type.(see the following table)
When Tool offset for Milling and Turning function option is effective, specify the following type.(Series 30i)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| length | in |
Specify the data block length(size of ODBTOFS structure=8). |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tofs | out |
Pointer to the ODBTOFS structure including the tool offset value. The ODBTOFS structure is as follows.
typedef struct odbtofs {
short datano ; /* offset number */
short type ; /* offset type */
long data ; /* offset value */
} ODBTOFS ;
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of ODBTOFS structure(length) is wrong. |
| EW_NUMBER |
Offset number(number) is wrong. |
| EW_ATTRIB |
Offset type(type) is wrong. |
ncdata\cnc_rdtofsinfo
Reads the memory type of tool offset, and the available number of it. Those are stored in "ofs_type" and "use_no" of "ODBTLINF" with signed binary format.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdtofsinfo(unsigned short FlibHndl, ODBTLINF *tlinf);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||
| tlinf | out |
Pointer to the ODBTLINF structure for the tool offset information. The ODBTLINF structure is as follows.
typedef struct odbtlinf {
short ofs_type; /* memory type */
short use_no; /* available number */
} ODBTLINF ;
|
|||||||||||||||||||||||||||||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||
| tlinf | out |
Pointer to the ODBTLINF structure for the tool offset information. The ODBTLINF structure is as follows.
typedef struct odbtlinf {
short ofs_type; /* memory type */
short use_no; /* available number */
} ODBTLINF ;
|
|||||||||||||||||||||||||||||||||||||||||||||
ERRORS
| Code | Description |
|---|
ncdata\cnc_rdtofsinfo2
Reads the memory type of tool offset, the available number of it and available type of tool offset.
Those are stored in "ofs_type", "use_no" and "ofs_enable" of "ODBTLINF2" with signed binary format.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdtofsinfo2(unsigned short FlibHndl, ODBTLINF2 *tlinf2);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tlinf2 | out |
Pointer to the ODBTLINF2 structure for the tool offset information. The ODBTLINF2 structure is as follows.
typedef struct odbtlinf2 {
short ofs_type; /* memory type */
short use_no; /* available number */
short ofs_enable ; /* available type of tool offset */
} ODBTLINF2 ;
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
|
ncdata\cnc_rdtofsr
Reads the tool offset value specified by "s_number","e_number","type".
The offset value is stored in "IODBTO" with signed binary format.
The unit of offset value is the same as "Read tool offset value(cnc_rdtofs)". See the description of cnc_rdtofs function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdtofsr(unsigned short FlibHndl, short s_number, short type, short e_number, short length, IODBTO *tofsr);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| s_number | in |
Specify the start tool offset number. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| e_number | in |
Specify the end tool offset number. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type | in |
Specify the tool offset type.(see the following table) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| length | in |
Specify the data block length.(see the following table) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tofsr | out |
Pointer to the IODBTO structure including the tool offset value.
typedef struct iodbto {
short datano_s; /* start offset number */
short type; /* offset type */
short datano_e; /* end offset number */
union {
long m_ofs[N]; /* M series individual */
long m_ofs_a[N]; /* M series Memory A all */
long m_ofs_b[2*N]; /* M series Memory B all */
long m_ofs_c[4*N]; /* M series Memory C all */
struct {
short tip ;
long data[1] ;
} m_ofs_at[N] ; /* M series Memory A all with direction of imaginary tool nose */
struct {
short tip ;
long data[2] ;
} m_ofs_bt[N] ; /* M series Memory B all with direction of imaginary tool nose */
struct {
short tip ;
long data[4] ;
} m_ofs_ct[N] ; /* M series Memory C all with direction of imaginary tool nose */
short t_tip[N]; /* T series individual,direction of imaginary tool nose */
long t_ofs[N]; /* T series individual */
struct {
short tip;
long data[4];
} t_ofs_a[N]; /* T series Memory A all */
struct {
short tip;
long data[8];
} t_ofs_b[N]; /* T series Memory B all */
long t_ofs_2g[3*N]; /* T series Second geometry all */
long m_ofs_cnr[10]; /* M-CornerR */
struct {
long data[2];
} t_ofs_ex[N]; /* T series 4th/5th Axis Offset Function all */
} u ;
} IODBTO ; /* N is number of the offset value. */
The combinations of the value specified in "type", the data block length "length", the kind of offset value to be read and the member in which the result is stored are as follows.
・ When the tool offset for milling and turning function option is valid.
N is number of offset to be read, i = 0,..,(N-1). |
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of ODBTOFS structure(length) is wrong. |
| EW_NUMBER |
Offset number(s_number, e_number) is wrong. |
| EW_ATTRIB |
Offset type(type) is wrong. |
ncdata\cnc_rdvolc
Reads the 3-dimensional error compensation data by specified range.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdvolc(unsigned short FlibHndl,ODBVOLC *volc, long *data);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| volc | in |
Pointer to the ODBTOFS structure including the reading information of 3-dimensional error compensation data. The ODBVOLC structure is as follows.
typedef struct odbvolc {
long start_no ; /* Reading start compensation number */
long start_ax ; /* Reading start axis index */
long end_no ; /* Reading end compensation number */
long end_ax ; /* Reading end axis index */
long num ; /* Reading number */
char type ; /* 0:Read by number 1:Read by end number specification */
long data[72] ; /* Reserved */
} ODBVOLC ;
When type=1 is specified for the reading method type, specify the other argument to become the following. 1 <= ((end_no - start_no) * 3 + (end_ax - start_ax) + 1) <= 78 |
||||||
| data | out |
Pointer to the area to store the 3-dimensional error compensation data. The number of maximum data which can read is 78. (Maximum size is data[78].) Data is stored in order of the 1st axis, 2nd axis and the 3rd axis from the little number. For example, when the data from the 3rd axis in No.5 to the 1st axis in No.8 is acquired by the end number specification, the acquired data becomes as follows. ODBVOLC volc ; long data[78] ; volc.start_no = 5 volc.start_ax = 3 volc.end_no = 8 volc.end_ax = 1 volc.type = 1 The 3-dimensional error compensation data is stored as follows. data[0] 3-dimensional error compensation data of 3rd axis in No.5. data[1] 3-dimensional error compensation data of 1st axis in No.6. data[2] 3-dimensional error compensation data of 2nd axis in No.6. data[3] 3-dimensional error compensation data of 3rd axis in No.6. data[4] 3-dimensional error compensation data of 1st axis in No.7. data[5] 3-dimensional error compensation data of 2nd axis in No.7. data[6] 3-dimensional error compensation data of 3rd axis in No.7. data[7] 3-dimensional error compensation data of 1st axis in No.8. |
ERRORS
| Code | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_DATA |
In order to get more information for this return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
||||||||||||||||||
| EW_NOOPT |
This function needs the 3-dimensional error compensation and the extended driver/library function option. |
ncdata\cnc_rdvolccomp
The compensation amount at the current position of 3-dimensional error compensation axis is acquired.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdvolccomp(unsigned short FlibHndl, ODBVOLCOMP *pvcmp);
ARGUMENTS
| Name | Direction | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||
| pvcmp | out |
Pointer to the ODBVOLCOMP structure to store the compensation amount data of each axis. The ODBVOLCOMP structure is as follows.
typedef struct pvcmp {
long comp[3] ; /* Compensation amount of each axis */
} ODBVOLCOMP ;
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
This function needs the 3-dimensional error compensation and the extended driver/library function option. |
ncdata\cnc_rdwkcdsfms
Reads the work coordinate shift measured value specified by "axis". The work coordinate shift measured value are stored in "data" array of "IODBWCSF" with signed binary format. The value for all axes can be read at a time by specifying ALL_AXES for "axis". The places of decimal points can be got by cnc_getfigure function. The unit of work coordinate shift measured value is the same as "Read work coordinate shift value( cnc_rdwkcdshft )". See the description of cnc_rdwkcdshft function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdwkcdsfms(unsigned short FlibHndl, short axis, short length, IODBWCSF *wkcdsfms);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| axis | in |
Specify the axis number.
|
||||||
| length | in |
Specify the data block length(size of IODBWCSF structure). IODBWCSF
n = Maximum controlled axes (The data for current controlled axes are valid.) n = Current controlled axes |
||||||
| wkcdsfms | out |
Pointer to the IODBWCSF structure for the work coordinate shift measured value. The IODBWCSF structure is as follows.
typedef struct iodbwcsf {
short dummy; /* (not used) */
short type; /* axis number */
long data[MAX_AXIS];/* work coordinate shift */
/* measured value */
} IODBWCSF ; /* MAX_AXIS : max. controlled axes */
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used at M series. |
| EW_LENGTH |
Size of IODBWCSF structure(length) is wrong. |
| EW_ATTRIB |
Axis number(axis) is wrong. |
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_PARAM |
CNC parameter '1201#6' must be 0. |
ncdata\cnc_rdwkcdshft
Reads the work coordinate shift value specified by "axis". The work coordinate shift value are stored in "data" array of "IODBWCSF" with signed binary format. The value for all axes can be read at a time by specifying ALL_AXES for "axis". The places of decimal points can be got by cnc_getfigure function. The unit of work coordinate shift value is as follows.
1004#1
(ISC)1004#0
(ISA)Linear axis
mm input
[mm]Linear axis
inch input
[inch]Rotation axis
[deg]
IS-B
0
0
0.001
0.0001
0.001
IS-C
1
0
0.0001
0.00001
0.0001
- Series 30i
| 1013#3 (ISE) |
1013#2 (ISD) |
1013#1 (ISC) |
1013#0 (ISA) |
Linear axis mm input [mm] |
Linear axis inch input [inch] |
Rotation axis [deg] |
|
|---|---|---|---|---|---|---|---|
| IS-A | 0 | 0 | 0 | 1 | 0.01 | 0.001 | 0.01 |
| IS-B | 0 | 0 | 0 | 0 | 0.001 | 0.0001 | 0.001 |
| IS-C | 0 | 0 | 1 | 0 | 0.0001 | 0.00001 | 0.0001 |
| IS-D | 0 | 1 | 0 | 0 | 0.00001 | 0.000001 | 0.00001 |
| IS-E | 1 | 0 | 0 | 0 | 0.000001 | 0.0000001 | 0.000001 |
- Series 0i-D/F
| 1013#1 (ISC) |
1013#0 (ISA) |
Linear axis mm input [mm] |
Linear axis inch input [inch] |
Rotation axis [deg] |
|
|---|---|---|---|---|---|
| IS-A | 0 | 1 | 0.01 | 0.001 | 0.01 |
| IS-B | 0 | 0 | 0.001 | 0.0001 | 0.001 |
| IS-C | 1 | 0 | 0.0001 | 0.00001 | 0.0001 |
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdwkcdshft(unsigned short FlibHndl, short axis, short length, IODBWCSF *wkcdshft);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| axis | in |
Specify the axis number.
|
||||||
| length | in |
Specify the data block length(size of IODBWCSF structure). IODBWCSF
n = Maximum controlled axes (The data for current controlled axes are valid.) n = Current controlled axes |
||||||
| wkcdshft | out |
Pointer to the IODBWCSF structure for the work coordinate shift value. The IODBWCSF structure is as follows.
typedef struct iodbwcsf {
short dummy; /* (not used) */
short type; /* axis number */
long data[MAX_AXIS];/* work coordinate shift value*/
} IODBWCSF ; /* MAX_AXIS : max. controlled axes */
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used at M series. |
| EW_LENGTH |
Size of IODBWCSF structure(length) is wrong. |
| EW_ATTRIB |
Axis number(axis) is wrong. |
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_PARAM |
CNC parameter '1201#6' must be 0. |
ncdata\cnc_rdzofs
Reads the work zero offset value specified by "number", "axis". The place of decimal point can be got by cnc_getfigure function. The unit of offset value is as follows.
The offset value is stored in "data[0]" of "IODBZOFS" with signed binary format.
Reads the offset value for all axes once by specifying 'ALL_AXES' in 'axis'. The offset value for each axis is stored in "data" array of "IODBZOFS".
1009#1
(ISE)1004#5
(ISD)1004#1
(ISF)1004#0
(ISR)Linear axis
mm input
[mm]Linear axis
inch input
[inch]Rotation axis
[deg]
IS-A
0
0
0
1
0.01
0.001
0.01
IS-B
0
0
0
0
0.001
0.0001
0.001
IS-C
0
0
1
0
0.0001
0.00001
0.0001
IS-D
0
1
0
0
0.00001
0.000001
0.00001
IS-E
1
0
0
0
0.000001
0.0000001
0.000001
- Series 15i
| 1012#3 (ISE) |
1012#2 (ISD) |
1012#1 (ISC) |
1012#0 (ISA) |
Linear axis mm input [mm] |
Linear axis inch input [inch] |
Rotation axis [deg] |
|
|---|---|---|---|---|---|---|---|
| IS-A | 0 | 0 | 0 | 1 | 0.01 | 0.001 | 0.01 |
| IS-B | 0 | 0 | 0 | 0 | 0.001 | 0.0001 | 0.001 |
| IS-C | 0 | 0 | 1 | 0 | 0.0001 | 0.00001 | 0.0001 |
| IS-D | 0 | 1 | 0 | 0 | 0.00001 | 0.000001 | 0.00001 |
| IS-E | 1 | 0 | 0 | 0 | 0.000001 | 0.0000001 | 0.000001 |
- Series 16/18/21, 16i/18i/21i, 0i-A/B/C
| 1004#1 (ISC) |
1004#0 (ISA) |
Linear axis mm input [mm] |
Linear axis inch input [inch] |
Rotation axis [deg] |
|
|---|---|---|---|---|---|
| IS-A | 0 | 1 | 0.01 | 0.001 | 0.01 |
| IS-B | 0 | 0 | 0.001 | 0.0001 | 0.001 |
| IS-C | 1 | 0 | 0.0001 | 0.00001 | 0.0001 |
- Series 30i
| 1013#3 (ISE) |
1013#2 (ISD) |
1013#1 (ISC) |
1013#0 (ISA) |
Linear axis mm input [mm] |
Linear axis inch input [inch] |
Rotation axis [deg] |
|
|---|---|---|---|---|---|---|---|
| IS-A | 0 | 0 | 0 | 1 | 0.01 | 0.001 | 0.01 |
| IS-B | 0 | 0 | 0 | 0 | 0.001 | 0.0001 | 0.001 |
| IS-C | 0 | 0 | 1 | 0 | 0.0001 | 0.00001 | 0.0001 |
| IS-D | 0 | 1 | 0 | 0 | 0.00001 | 0.000001 | 0.00001 |
| IS-E | 1 | 0 | 0 | 0 | 0.000001 | 0.0000001 | 0.000001 |
- Series 0i-D/F
| 1013#1 (ISC) |
1013#0 (ISA) |
Linear axis mm input [mm] |
Linear axis inch input [inch] |
Rotation axis [deg] |
|
|---|---|---|---|---|---|
| IS-A | 0 | 1 | 0.01 | 0.001 | 0.01 |
| IS-B | 0 | 0 | 0.001 | 0.0001 | 0.001 |
| IS-C | 1 | 0 | 0.0001 | 0.00001 | 0.0001 |
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdzofs(unsigned short FlibHndl, short number, short axis, short length, IODBZOFS *zofs);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||
| number | in |
Specify the work zero offset number.
|
|||||||||||||||||||||||||||||||||||||||||
| axis | in |
Specify the axis number.
|
|||||||||||||||||||||||||||||||||||||||||
| length | in |
Specify the data block length(size of IODBZOFS structure). IODBZOFS
n = Maximum controlled axes
n = Current controlled axes |
|||||||||||||||||||||||||||||||||||||||||
| zofs | out |
Pointer to the IODBZOFS structure including the work zero offset value. The IODBZOFS structure is as follows.
typedef struct iodbzofs {
short datano; /* offset number */
short type; /* axis number */
long data[MAX_AXIS]; /* offset data value */
} IODBZOFS ; /* MAX_AXIS : max. controlled axes */
|
|||||||||||||||||||||||||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||
| number | in |
Specify the work zero offset number. |
|||||||||||||||||||||||||||||||||||||||||
| axis | in |
Specify the axis number.
|
|||||||||||||||||||||||||||||||||||||||||
| length | in |
Specify the data block length(size of IODBZOFS structure). IODBZOFS
|
|||||||||||||||||||||||||||||||||||||||||
| zofs | out |
Pointer to the IODBZOFS structure including the work zero offset value. The IODBZOFS structure is as follows.
typedef struct iodbzofs {
short datano; /* offset number */
short type; /* axis number */
long data[MAX_AXIS]; /* offset data value */
} IODBZOFS ; /* MAX_AXIS : max. controlled axes */
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of IODBZOFS structure(length) is wrong. |
| EW_NUMBER |
Offset number(number) is wrong. |
| EW_ATTRIB |
Axis number(axis) is wrong. |
| EW_NOOPT |
This function needs the work zero offset option. |
ncdata\cnc_rdzofsinfo
Reads the available number of work zero offset. It is stored in "*use_no" with signed binary format.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdzofsinfo(unsigned short FlibHndl, short *use_no);
ARGUMENTS
| Name | Direction | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||
| use_no | out |
Available number of work zero offset
|
||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||
| use_no | out |
Available number of work zero offset (7/55/307 sets) |
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
This function needs the work zero offset option. |
ncdata\cnc_rdzofsr
Reads the work zero offset value specified by "s_number", "e_number", "axis". The offset value is stored in "data" array of "IODBZOR" with signed binary format. Reads the offset value for all axes once by specifying 'ALL_AXES' in 'axis'. The place of decimal point can be got by cnc_getfigure function. The unit of offset value is the same as cnc_rdzofs function. See the description of cnc_rdzofs function. As for Series 16i/18i-W, the unit of offset value is as follows.
1004#1
(ISC)1004#0
(ISA)Linear axis
mm input
[mm]Linear axis
inch input
[inch]Rotation axis
[deg]
IS-A
0
1
0.01
0.001
0.01
IS-B
0
0
0.001
0.0001
0.001
IS-C
1
0
0.0001
0.00001
0.0001
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdzofsr(unsigned short FlibHndl, short s_number, short axis, short e_number, short length, IODBZOR *zofsr);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||
| s_number | in |
Specify the start work zero offset number.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| e_number | in |
Specify the end work zero offset number. |
||||||||||||||||||||||||||||||||||||||||||||||||||||
| axis | in |
Specify the axis number.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| length | in |
Specify the data block length(size of IODBZOR structure). IODBZOR
n = Maximum controlled axes(The data for current controlled axes are valid.) |
||||||||||||||||||||||||||||||||||||||||||||||||||||
| zofsr | out |
Pointer to the IODBZOR structure including the work zero offset value. The IODBZOR structure is as follows.
typedef struct iodbzor {
short datano_s; /* start offset number */
short type; /* axis number */
short datano_e; /* end offset number */
long data[MAX_AXIS*K];/* offset data value */
} IODBZOR ; /* MAX_AXIS : max. controlled axes */
/* K : number of offset */
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||
| s_number | in |
Specify the start work zero offset number.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| e_number | in |
Specify the end work zero offset number. |
||||||||||||||||||||||||||||||||||||||||||||||||||||
| axis | in |
Specify the axis number.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| length | in |
Specify the data block length(size of IODBZOR structure). IODBZOR
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| zofsr | out |
Pointer to the IODBZOR structure including the work zero offset value. The IODBZOR structure is as follows.
typedef struct iodbzor {
short datano_s; /* start offset number */
short type; /* axis number */
short datano_e; /* end offset number */
long data[MAX_AXIS*K];/* offset data value */
} IODBZOR ; /* MAX_AXIS : max. controlled axes */
/* K : number of offset */
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of IODBZOR structure(length) is wrong. |
| EW_NUMBER |
Offset number(s_number, e_number) is wrong. |
| EW_ATTRIB |
Axis number(axis) is wrong. |
| EW_NOOPT |
This function needs the work zero offset option. |
ncdata\cnc_setmactype
Changes the type of custom macro variable which is used by
cnc_rdmacro,
cnc_wrmacro,
cnc_rdmacror,
cnc_wrmacror functions.
PROTOTYPE
FWLIBAPI short WINAPI cnc_setmactype(unsigned short FlibHndl, short macro_type);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| macro_type | in |
|
ERRORS
| Code | Description |
|---|
ncdata\cnc_setpmactype
Changes the type of P code macro variable which is used by cnc_rdpmacro, cnc_wrpmacro, cnc_rdpmacror, cnc_wrpmacror functions.
PROTOTYPE
FWLIBAPI short WINAPI cnc_setpmactype(unsigned short FlibHndl, short pmacro_type);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| pmacro_type | in |
|
ERRORS
| Code | Description |
|---|
ncdata\cnc_tofs_rnge
Reads the effective setting range of tool offset value specified by
"number", "type". The unit of offset value is as follows.
The effective setting range is stored in "data_min", "data_max" of
ODBDATRNG with signed binary format.
5042#3
(OFE)5042#2
(OFD)5042#1
(OFC)5042#0
(OFA)Linear axis
mm input
[mm]Linear axis
inch input
[inch]
0
0
0
1
0.01
0.001
0
0
0
0
0.001
0.0001
0
0
1
0
0.0001
0.00001
0
1
0
0
0.00001
0.000001
1
0
0
0
0.000001
0.0000001
5042#1
(OFC)5042#0
(OFA)Linear axis
mm input
[mm]Linear axis
inch input
[inch]
0
1
0.01
0.001
0
0
0.001
0.0001
1
0
0.0001
0.00001
PROTOTYPE
FWLIBAPI short WINAPI cnc_tofs_rnge(unsigned short FlibHndl,short number, short type,ODBDATRNG *tofsr);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||
| number | in |
Specify the tool offset number. |
||||||||||||||||||||||||||||||||||||||
| type | in |
Specify the tool offset type.(see the following table)
|
||||||||||||||||||||||||||||||||||||||
| tofsr | out |
Specify the pointer of the ODBDATRNG structure that stores the upper and lower limit of tool offset value. The ODBDATRNG structure is as follows.
typedef struct odbdatrng {
long data_min ; /* lower limit */
long data_max ; /* upper limit */
long status; /* status of setting value */
} ODBDATRNG ;
|
ERRORS
| Code | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_NUMBER |
Offset number(number) is wrong. |
||||||||||||
| EW_ATTRIB |
Offset type(type) is wrong. |
||||||||||||
| EW_DATA |
In order to get more information for this return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
ncdata\cnc_wksft_rnge
Reads the effective setting range of work coordinate shift value
specified by "axis". The places of decimal points can be got by cnc_getfigure function. The unit of work coordinate shift value is as follows.
The effective setting range is stored in "data_min", "data_max" of ODBDATRNG with signed binary format.
1013#3
(ISE)1013#2
(ISD)1013#1
(ISC)1013#0
(ISA)Linear axis
mm input
[mm]Linear axis
inch input
[inch]
IS-A
0
0
0
1
0.01
0.001
IS-B
0
0
0
0
0.001
0.0001
IS-C
0
0
1
0
0.0001
0.00001
IS-D
0
1
0
0
0.00001
0.000001
IS-E
1
0
0
0
0.000001
0.0000001
| 1013#1 (ISC) |
1013#0 (ISA) |
Linear axis mm input [mm] |
Linear axis inch input [inch] |
|
|---|---|---|---|---|
| IS-A | 0 | 1 | 0.01 | 0.001 |
| IS-B | 0 | 0 | 0.001 | 0.0001 |
| IS-C | 1 | 0 | 0.0001 | 0.00001 |
PROTOTYPE
FWLIBAPI short WINAPI cnc_wksft_rnge(unsigned short FlibHndl, short axis,ODBDATRNG *wkcdshftr);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| axis | in |
Specify the axis number to be read.
|
||||||
| wkcdshft | out |
Specify the pointer of the ODBDATRNG structure that stores the upper and lower limit of work coordinate shift value. The ODBDATRNG structure is as follows.
typedef struct odbdatrng {
long data_min ; /* lower limit */
long data_max ; /* upper limit */
long status; /* status of setting value */
} ODBDATRNG ;
|
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_FUNC |
This function cannot be used at M series. |
|||||||||
| EW_ATTRIB |
Axis number(axis) is wrong. |
|||||||||
| EW_NOOPT |
The extended driver/library function is necessary. |
|||||||||
| EW_PARAM |
CNC parameter '1201#6' must be 0. |
|||||||||
| EW_DATA |
In order to get more information for this return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
ncdata\cnc_wrbtofsr
Writes the tool offset value for B axis specified by "datano_s", "datano_e","type". The offset value must be stored in "IODBBTO" with signed binary format. The unit of offset value is the same as "Write tool offset value( cnc_wrtofs )". See the description of cnc_wrtofs function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrbtofsr(unsigned short FlibHndl, short length, IODBBTO *btofsr);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| length | in |
Specify the data block length. |
| btofsr | in |
Pointer to the IODBBTO structure including the tool offset value. The IODBBTO structure is as follows.
typedef struct iodbbto {
short datano_s; /* start offset number */
short type; /* offset type */
short datano_e; /* end offset number */
long ofs[M]; /* offset value */
} IODBBTO ; /* Individual, Memory A all */
/* M is number of the offset value. */
/* Memory B all */
/* M is number of the offset value x 2. */
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used at M series. |
| EW_LENGTH |
Size of IODBBTO structure(length) is wrong. |
| EW_NUMBER |
Offset number(datano_s, datano_e) is wrong. |
| EW_ATTRIB |
Offset type(type) is wrong. |
| EW_NOOPT |
The B axis control option and the extended driver/library function are necessary. |
ncdata\cnc_wrfixofs
The unit of offset value is the same as "Read work zero offset value
( cnc_rdzofs )". See the description of cnc_rdzofs function.
The value for all axes can be written at a time by specifying
'ALL_AXES' in 'type'.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrfixofs(unsigned short FlibHndl, short length, IODBZOR *fixofsr);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| length | in |
Specify the data block length (size of IODBZOR structure). (8+4*(number of axes)*(number of offset)) IODBZOR
n = Maximum controlled axes (* The data for current controlled axes are valid.) |
||||||
| fixofsr | in |
Pointer to the IODBZOR structure for the fixture offset value. The IODBZOR structure is as follows.
typedef struct iodbzor {
short datano_s; /* start offset number */
short type; /* axis number */
short datano_e; /* end offset number */
long data[MAX_AXIS*K]; /* offset data value */
} IODBZOR ; /* MAX_AXIS : max. controlled axes */
/* K : number of offset */
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used at T Series. |
| EW_LENGTH |
Size of IODBZOR structure(length) is wrong. |
| EW_NUMBER |
Fixture offset number(datano_s,datano_e) is wrong. |
| EW_ATTRIB |
Axis number(type) is wrong. |
| EW_NOOPT |
The rotary table dynamic fixture offset option and the extended driver/library function are necessary. The custom macro B option is necessary(only 16i/18i/21i). |
ncdata\cnc_wrhpccset
Writes setting data for high-speed and high-precision machining. This function is not supported on Series 15i. The function which
writes CNC parameter ( cnc_wrparam or cnc_wrparas ) can be substituted for this function.
Refer to CNC operator's manual and CNC parameter manual in order to
know CNC parameters which correspond to the data to be written by this
function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrhpccset(unsigned short FlibHndl, IODBHPST *hpst);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| hpst | in |
Pointer to the IODBHPST structure for the setting data for High-speed and high-precision machining. The IODBHPST structure is as follows.
typedef struct iodbhpst {
short slct; /* flag of valid data */
short hpcc; /* high precision contour control */
short multi; /* multi buffer */
short ovr1; /* override by Z-axis down */
short ign_f; /* ignore feed at program */
short foward; /* feed forward */
long max_f; /* maximum feed of high precision */
/* contour control */
short ovr2; /* override at area 2 */
short ovr3; /* override at area 3 */
short ovr4; /* override at area 4 */
long reserve[7]; /* (not used) */
} IODBHPST ;
|
ERRORS
| Code | Description | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_FUNC |
This function cannot be used at T Series. |
|||||||||||||||||||||||||||
| EW_DATA |
Setting data for high-speed and high-precision machining(IODBHPST) is wrong. In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
|
|||||||||||||||||||||||||||
| EW_NOOPT |
The extended driver/library function is necessary. |
|||||||||||||||||||||||||||
| EW_PROT |
- Protection KEY(DI/KEY2) is off. - CNC parameter is a state of write-protection. |
|||||||||||||||||||||||||||
| EW_MODE |
The mode is not in MDI. |
ncdata\cnc_wrhpcctuac
Writes tuning data(acc./dec. input) for high-speed and high-precision machining. This function is not supported on Series 15i. The function which writes CNC parameter ( cnc_wrparam or cnc_wrparas ) can be substituted for this function.
Refer to CNC operator's manual and CNC parameter manual in order to know CNC parameters which correspond to the data to be written by this function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrhpcctuac(unsigned short FlibHndl, IODBHPAC *hpac);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||
| hpac | in |
Pointer to the IODBHPAC structure for the tuning data(acc./dec. input) for high-speed and high-precision machining. The IODBHPAC structure is as follows.
typedef struct iodbhpac {
struct {
short slct; /* flag of valid data */
short diff; /* (not used) */
short fine; /* fine level */
short acc_lv; /* acceleration/deceleration level*/
long bipl; /* acceleration for before IPL */
short aipl; /* time constant for after IPL */
long corner; /* difference of corner feed */
long clamp; /* acceleration for clamp */
long c_acc; /* acceleration of feed clamp by */
/* radius of circle*/
long foward; /* coefficient of feed forward */
long reserve[8]; /* (not used) */
}tune[3]
} IODBHPAC ;
hpac.tune[0].slct,...,hpac.tune[0].reserve
: tuning data for fine level
hpac.tune[1].slct,...,hpac.tune[1].reserve
: tuning data for medium level
hpac.tune[2].slct,...,hpac.tune[2].reserve
: tuning data for rough level
|
ERRORS
| Code | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_FUNC |
This function cannot be used at T Series. |
||||||||||||||||||||||||
| EW_DATA |
Tuning data for high-speed and high-precision machining(IODBHPAC) is wrong. In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
|
||||||||||||||||||||||||
| EW_NOOPT |
The extended driver/library function is necessary. |
||||||||||||||||||||||||
| EW_PROT |
- Protection KEY(DI/KEY2) is off. - CNC parameter is a state of write-protection. |
||||||||||||||||||||||||
| EW_MODE |
The mode is not in MDI. |
ncdata\cnc_wrhpcctupr
Writes tuning data(parameter input) for high-speed and high-precision
machining. This function is not supported on Series 15i. The function which writes CNC parameter ( cnc_wrparam or cnc_wrparas ) can be substituted for this function.
Refer to CNC operator's manual and CNC parameter manual in order to know CNC parameters which correspond to the data to be written by this function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrhpcctupr(unsigned short FlibHndl, IODBHPPR *hppr);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||
| hppr | out |
Pointer to the IODBHPPR structure for the tuning data(parameterinput) for high-speed and high-precision machining. The IODBHPPR structure is as follows.
typedef struct iodbhppr {
struct {
short slct; /* flag of valid data */
short diff; /* (not used) */
short fine; /* fine level */
short acc_lv; /* acceleration/deceleration level*/
long max_f; /* maximum feed */
short bipl; /* time constant for before IPL */
short aipl; /* time constant for after IPL */
long corner; /* difference of corner feed */
short clamp; /* clamp by acceleration */
long radius; /* radius of feed clamp by radius*/
/* of circle*/
long max_cf; /* maximum feed of feed clamp by */
/* radius of circle*/
long min_cf; /* minimum feed of feed clamp by */
/* radius of circle*/
long foward; /* coefficient of feed forward */
long reserve[5]; /* (not used) */
}tune[3]
} IODBHPPR ;
hppr.tune[0].slct,...,hppr.tune[0].reserve
: tuning data for fine level
hppr.tune[1].slct,...,hppr.tune[1].reserve
: tuning data for medium level
hppr.tune[2].slct,...,hppr.tune[2].reserve
: tuning data for rough level
|
ERRORS
| Code | Description | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_FUNC |
This function cannot be used at T Series. |
|||||||||||||||||||||||||||||||||
| EW_DATA |
Tuning data for high-speed and high-precision machining(IODBHPPR) is wrong. In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
|
|||||||||||||||||||||||||||||||||
| EW_NOOPT |
The extended driver/library function is necessary. |
|||||||||||||||||||||||||||||||||
| EW_PROT |
- Protection KEY(DI/KEY2) is off. - CNC parameter is a state of write-protection. |
|||||||||||||||||||||||||||||||||
| EW_MODE |
The mode is not in MDI. |
ncdata\cnc_wrintchk
The unit of coordinate value is the same as "Read work zero offset
value( cnc_rdzofs )". See the description of cnc_rdzofs function.
The coordinate value must be stored in "data" array of "IODBINT" with
signed binary format.
All value can be written at a time by specifying ALL_AXES for "type".
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrintchk(unsigned short FlibHndl, short length, IODBINT *intchk);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||
| length | in |
Specify the data block length (size of IODBINT structure). (8+4*(number of coordinate)*(number of data)) T series IODBINT
K : Number of data to be written
M series IODBINT
|
||||||||||||||||||||||||||||||||||||||||
| intchk | in |
Pointer to the IODBINT structure for the coordinate value of interference check data. The IODBINT structure is as follows.
typedef struct iodbint {
short datano_s; /* start data number */
short type; /* coordinate type */
short datano_e; /* end data number */
long data[8*K]; /* coordinate value */
} IODBINT ; /* K : number of data to be written */
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used without 2 path control function. |
| EW_LENGTH |
Size of IODBINT structure(length) is wrong. |
| EW_NUMBER |
Type of coordinate(type) is wrong. |
| EW_ATTRIB |
Type of coordinate(type) is wrong. |
| EW_DATA |
Coordinate value of interference check area (data) is out of range. In order to get more information for this err_no return value, execute cnc_getdtailerr function. Data number will be set onto the member of err_no of ODBERR structure and type of coordinate will be set onto the member of err_dtno of ODBERR structure. |
| EW_NOOPT |
The tool post interference check option (T series) or the multi-path interference check option (M series), and the extended driver/library function are necessary. |
ncdata\cnc_wrmacro
Writes the custom macro variable specified by "number". The data must be stored in "mcr_val", "dec_val" with signed binary format. The kind of custom macro variable is as follows. The local variable cannot be written. It is possible to exchange the type of macro variable by cnc_setmactype function. The value of an undefined variable is called "vacant", and it is expressed as follows both at decimal form floating-point type and at binary form floating-point type. mcr_val = 0 See "OPERATOR'S MANUAL" of CNC for details of the custom macro variable.
mcr_val
:
value of variable(=M)
4-byte binary data with sign
(available range:999999999 to -999999999)
dec_val
:
number of places of decimals(=E)
2-byte binary data with sign
(available range:-128 to 127)
mcr_val
:
numerical part of variable(=M)
4-byte binary data with sign
(available range:No limitation)
dec_val
:
exponent part of variable(=E)
2-byte binary data with sign
(available range:-128 to 127)
dec_val = -1
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrmacro(unsigned short FlibHndl, short number, short length, long mcr_val, short dec_val);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| number | in |
Specify the custom macro variable number. |
| length | in |
Specify 10. |
| mcr_val | in |
Specify the value of variable/numerical part of variable. |
| dec_val | in |
Specify the number of places of decimals/exponent part of variable. |
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size (length) is wrong. |
| EW_NUMBER |
Custom macro variable number (number) is wrong. |
| EW_DATA |
Value of custom macro variable (mcr_val, dec_val) is out of available range. |
| EW_NOOPT |
This function needs the custom macro option. |
| EW_PROT |
The variable is read-only. |
ncdata\cnc_wrmacror
Writes the custom macro variable specified by "datano_s", "datano_e". The data must be stored in "IODBMR" with signed binary format. The kind of custom macro variable is as follows. The local variable cannot be written. It is possible to exchange the type of macro variable by cnc_setmactype function. The value of an undefined variable is called "vacant", and it is expressed as follows both at decimal form floating-point type and at binary form floating-point type. mcr_val = 0 See "OPERATOR'S MANUAL" of CNC for details of the custom macro variable.
mcr_val
:
value of variable(=M)
4-byte binary data with sign
(available range:999999999,..,-999999999)
dec_val
:
number of places of decimals(=E)
2-byte binary data with sign
(available range:-128,..,127)
mcr_val
:
numerical part of variable(=M)
4-byte binary data with sign
(available range:No limitation)
dec_val
:
exponent part of variable(=E)
2-byte binary data with sign
(available range:-128,..,127)
dec_val = -1
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrmacror(unsigned short FlibHndl, short length, IODBMR *macror);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| length | in |
Specify the data block length (size of IODBMR structure). 8+8*(Number of custom macro variable) IODBMR
N : Number of custom macro variable |
| macror | in |
Pointer to the IODBMR structure including the custom macro variable. The IODBMR structure is as follows.
typedef struct iodbmr {
short datano_s; /* start custom macro variable number*/
short dummy; /* (not used) */
short datano_e; /* end custom macro variable number */
struct {
long mcr_val; /* value of custom macro var. */
short dec_val; /* number of places of decimals*/
} data[N]; /* N : number of variable */
} IODBMR;
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of IODBMR structure(length) is wrong. |
| EW_NUMBER |
Custom macro variable number(datano_s, datano_e) is wrong. |
| EW_DATA |
Value of custom macro variable(mcr_val, dec_val) is out of available range. |
| EW_NOOPT |
This function needs the custom macro option. |
| EW_PROT |
The variable is read-only. |
ncdata\cnc_wrmacror2
Writes the custom macro variables specified by the starting number, "s_no", and number of variables, "*num". The data is stored in "data" with double format. It is not influenced by setting of cnc_setmactype function. The kind of custom macro variable is as follows. The local variable(#1,..,#33) cannot be written. The value of an undefined variable is called "vacant", and it is expressed as follows. 0xFFFFFFFFFFFFFFFF See "OPERATOR'S MANUAL" of CNC for details of the custom macro variable.
(1)
Common variable (#100,..,#999)
See the description of cnc_rdmacroinfo function about the available range of common variables.
(2)
Common variable (#98000〜#98499)
See the description of cnc_rdmacroinfo function about the available range of common variables.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrmacror2(unsigned short FlibHndl, unsigned long s_no, unsigned long *num, double *data);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| s_no | in |
Specify the start custom macro variable number. |
| num | in/out |
Specify pointer to the number of custom macro variable. |
| data | in |
Pointer to the data of custom macro variable. |
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
The number of custom macro variables(*num) is 0 or less. |
| EW_NUMBER |
Custom macro variable number(s_no) is wrong. |
| EW_NOOPT |
This function needs the custom macro option. |
| EW_PROT |
The variable is read-only. |
ncdata\cnc_wrmgrpdata
Writes specified number of M code group data starting from the specified number.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrmgrpdata(unsigned short FlibHndl, IDBMGRP *buf);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| buf | in |
Pointer to the IDBMGRP structure which specifies the M code group data to be written. The IDBMGRP structure is as follows.
typedef struct idbmgrp {
short s_no;
short dummy;
short num;
short group[N];
} IDBMGRP;
/* N stands for the number of M code group data being written.(Maximum 500) */
|
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_LENGTH |
The number indication(num) is wrong. |
||||||
| EW_NUMBER |
The start number(s_no) is wrong. |
||||||
| EW_DATA |
The number of M code group is wrong. In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
||||||
| EW_NOOPT |
The M code group option and the extended driver/library function are necessary. |
||||||
| EW_MODE |
The mode is not in MDI. |
||||||
| EW_REJECT |
MDI operation is in progress. |
||||||
| EW_PROT |
'Parameter write enable' of CNC parameter is 0. |
ncdata\cnc_wrparam
Writes the parameter specified by "datano","type"(only for the parameter with axis). The data format depends on each parameter. The format of Byte/Word/2-Word parameter is generally signed binary. Writes the parameter for all axes once by specifying 'ALL_AXES' in 'type'. The parameter for each axis must be stored in each array of "IODBPSD". The attribute of CNC parameter depends on the type and axis, and it is different for each parameter. It is as follows, and can be got by cnc_rdparainfo function. It is impossible to write any bit parameter bit by bit. 8 bits(i.e. 1 byte) which belong to the same parameter number are written at the same time. PW000 alarm(Series 15/15i, 30i, 0i-D/F, PMi-A), PS000 alarm(Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i): "PLEASE TURN OFF POWER" may be issued when some specific parameters are written. The error(Return:EW_PROT) is returned when the locked parameter such as parameter more than 9000 is written. PW000 alarm: "PLEASE TURN OFF POWER" may be issued when some specific parameters are written. The error(Return:EW_PROT) is returned when the locked parameter such as parameter more than 9000 is written. See the "PARAMETER MANUAL" of CNC for details of each parameter.
Parameter type
Meaning
Byte size
Bit parameter
Every bits have each definition.
1
Bit parameter with axis
Every bits have each definition. (each axis)
1
Byte parameter
1-byte data is stored.
1
Byte parameter with axis
1-byte data is stored. (each axis)
1
Word parameter
2-byte data is stored.
2
Word parameter with axis
2-byte data is stored. (each axis)
2
2-Word parameter
4-byte data is stored.
4
2-Word parameter with axis
4-byte data is stored. (each axis)
4
Real parameter
(only Series 15i, 30i, 0i-D/F, PMi-A)
4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored.
8
Real parameter with axis
(only Series 15i, 30i, 0i-D/F, PMi-A)
4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored. (each axis)
8
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrparam(unsigned short FlibHndl, short length, IODBPSD *param);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||
| length | in |
Specify the data block length(size of IODBPSD structure). 4+(byte size of parameter)*(number of axis) In case that the size of parameter is 4 byte, the IODBPSD structure is as follows. In case that its size is 1, 2, or 8 byte, the size of data part per 1 parameter or 1 axis is 1, 2, 8 byte. IODBPSD
n = Maximum controlled axes
n = Current controlled axes The spindle parameters have an axis attribute, and the data for number of spindle are valid. |
|||||||||||||||||||||||||||||||||
| param | in |
Pointer to the IODBPSD structure including the parameter. The IODBPSD structure is as follows.
Series 15, 16/18/21, 16i/18i/21i, 0i-A/B and Power Mate i
typedef struct iodbpsd {
short datano; /* parameter number */
short type; /* axis number */
union {
char cdata; /* bit/byte parameter */
short idata; /* word parameter */
long ldata; /* 2-word parameter */
char cdatas[MAX_AXIS]; /* bit/byte parameter with axis*/
short idatas[MAX_AXIS]; /* word parameter with axis */
long ldatas[MAX_AXIS]; /* 2-word parameter with axis */
} u ;
} IODBPSD ; /* MAX_AXIS : max. controlled axes */
Series 15i, 30i, 0i-D/F, PMi-A and Ethernet connection
typedef struct realprm { /* real parameter */
long prm_val; /* value of variable */
long dec_val; /* number of places of decimals */
} REALPRM;
typedef struct iodbpsd {
short datano; /* parameter number */
short type; /* upper byte:type */
/* lower byte:axis */
union {
char cdata; /* bit/byte parameter */
short idata; /* word parameter */
long ldata; /* 2-word parameter */
REALPRM rdata; /* real parameter */
char cdatas[MAX_AXIS];/*bit/byte parameter with axis*/
short idatas[MAX_AXIS];/* word parameter with axis */
long ldatas[MAX_AXIS];/* 2-word parameter with axis */
REALPRM rdatas[MAX_AXIS];/* real parameter with axis */
} u;
} IODBPSD ; /* MAX_AXIS : max. controlled axes */
|
|||||||||||||||||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||
| length | in |
Specify the data block length(size of IODBPSD structure). 4+(byte size of parameter)*(number of axis) In case that the size of parameter is 4 byte, the IODBPSD structure is as follows. In case that its size is 1, 2, or 8 byte, the size of data part per 1 parameter or 1 axis is 1, 2, 8 byte. IODBPSD
The spindle parameters have an axis attribute, and the data for number of spindle are valid. |
|||||||||||||||||||||||||||||||||
| param | in |
Pointer to the IODBPSD structure including the parameter. The IODBPSD structure is as follows.
typedef struct realprm { /* real parameter */
long prm_val; /* value of variable */
long dec_val; /* number of places of decimals */
} REALPRM;
typedef struct iodbpsd {
short datano; /* parameter number */
short type; /* upper byte:type */
/* lower byte:axis */
union {
char cdata; /* bit/byte parameter */
short idata; /* word parameter */
long ldata; /* 2-word parameter */
REALPRM rdata; /* real parameter */
char cdatas[MAX_AXIS];/*bit/byte parameter with axis*/
short idatas[MAX_AXIS];/* word parameter with axis */
long ldatas[MAX_AXIS];/* 2-word parameter with axis */
REALPRM rdatas[MAX_AXIS];/* real parameter with axis */
} u;
} IODBPSD ; /* MAX_AXIS : max. controlled axes */
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of IODBPSD structure(length) is wrong. |
| EW_NUMBER |
Parameter number(datano) is wrong. |
| EW_ATTRIB |
Axis number(type) is wrong. |
| EW_NOOPT |
There is no option required for the specified parameter. ( Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i ) |
| EW_PROT |
|
| EW_PASSWD |
( Series 16i/18i/21i, 0i-A/B/C ) |
ncdata\cnc_wrparas
Writes all parameters stored in "param". The data format depends on each parameter. The format of Byte/Word/2-Word parameter is generally signed binary. Writes the parameter for all axes once by specifying 'ALL_AXES' in 'type'. The parameter for each axis must be stored in each array of "IODBPSD". The attribute of CNC parameter depends on the type and axis, and it is
different for each parameter. It is as follows, and can be got by
cnc_rdparainfo function. It is impossible to write any bit parameter bit by bit. 8 bits(i.e. 1 byte) which belong to the same parameter number are written at the same time. PW000 alarm(Series15/15i, 30i, 0i-D/F, PMi-A), PS000 alarm(Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i): "PLEASE TURN OFF POWER" may be issued when some specific parameters are written. The error(Return:EW_PROT) is returned when CNC is not in the emergency stop. It is also returned when the locked parameter such as parameter larger than 9000 is written, but other parameters are written. PW000 alarm : "PLEASE TURN OFF POWER" may be issued when some specific parameters are written. The error(Return:EW_PROT) is returned when the locked parameter such as parameter more than 9000 is written. See the "PARAMETER MANUAL" of CNC for details of each parameter.
Parameter type
Meaning
Byte size
Bit parameter
Every bits have each definition.
1
Bit parameter with axis
Every bits have each definition. (each axis)
1
Byte parameter
1-byte data is stored.
1
Byte parameter with axis
1-byte data is stored. (each axis)
1
Word parameter
2-byte data is stored.
2
Word parameter with axis
2-byte data is stored. (each axis)
2
2-Word parameter
4-byte data is stored.
4
2-Word parameter with axis
4-byte data is stored. (each axis)
4
Real parameter
(only Series 15i, 30i, 0i-D/F, PMi-A)
4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored.
8
Real parameter with axis
(only Series 15i, 30i, 0i-D/F, PMi-A)
4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored. (each axis)
8
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrparas(unsigned short FlibHndl, short length, void *param);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||
| length | in |
Specify the data block length which is enough to store the
specified parameter. [= Sum of (4+(byte size of each parameter)*(number of axis))] In case that the size of parameter is 2 byte, the IODBPSD structure is as follows. In case that the size of parameter is 1 or 2 byte and the length per 1 parameter is not a multiple of 4, 'dummy' is necessary at the end of structure. In case that its size is 4 or 8 byte, the size of data part per 1 parameter or 1 axis is 4 or 8 byte, and so 'dummy' is not necessary. IODBPSD
n = Maximum controlled axes In case of Series 15i, 16/18/21, 16i/18i/21i, 0i, 30i, Power Mate i and PMi-A, the spindle parameters have an axis attribute, and the data for number of spindle are valid. |
||||||||||||||||||||||||
| param | in |
Pointer to the area to store the parameters.
Series 15, 16/18/21, 16i/18i/21i, 0i-A/B and Power Mate i
typedef struct iodbpsd {
short datano; /* parameter number */
short type; /* upper byte:type */
/* lower byte:axis */
union {
char cdata; /* bit/byte parameter */
short idata; /* word parameter */
long ldata; /* 2-word parameter */
char cdatas[MAX_AXIS]; /* bit/byte parameter with axis*/
short idatas[MAX_AXIS]; /* word parameter with axis */
long ldatas[MAX_AXIS]; /* 2-word parameter with axis */
} u ;
} IODBPSD ; /* MAX_AXIS : max. controlled axes */
Series 15i, 30i, 0i-D/F, PMi-A and Ethernet connection
typedef struct realprm { /* real parameter */
long prm_val; /* value of variable */
long dec_val; /* number of places of decimals */
} REALPRM;
typedef struct iodbpsd {
short datano; /* parameter number */
short type; /* upper byte:type */
/* lower byte:axis */
union {
char cdata; /* bit/byte parameter */
short idata; /* word parameter */
long ldata; /* 2-word parameter */
REALPRM rdata; /* real parameter */
char cdatas[MAX_AXIS];/*bit/byte parameter with axis*/
short idatas[MAX_AXIS];/* word parameter with axis */
long ldatas[MAX_AXIS];/* 2-word parameter with axis */
REALPRM rdatas[MAX_AXIS];/* real parameter with axis */
} u;
} IODBPSD ; /* MAX_AXIS : max. controlled axes */
|
||||||||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||
| length | in |
Specify the data block length which is enough to store the
specified parameter. [= Sum of (4+(byte size of each parameter)*(number of axis))] In case that the size of parameter is 2 byte, the IODBPSD structure is as follows. In case that the size of parameter is 1 or 2 byte and the length per 1 parameter is not a multiple of 4, 'dummy' is necessary at the end of structure. In case that its size is 4 or 8 byte, the size of data part per 1 parameter or 1 axis is 4 or 8 byte, and so 'dummy' is not necessary. IODBPSD
The spindle parameters have an axis attribute, and the data for number of spindle are valid. |
||||||||||||||||||||||||
| param | in |
Pointer to the area to store the parameters.
typedef struct realprm { /* real parameter */
long prm_val; /* value of variable */
long dec_val; /* number of places of decimals */
} REALPRM;
typedef struct iodbpsd {
short datano; /* parameter number */
short type; /* upper byte:type */
/* lower byte:axis */
union {
char cdata; /* bit/byte parameter */
short idata; /* word parameter */
long ldata; /* 2-word parameter */
REALPRM rdata; /* real parameter */
char cdatas[MAX_AXIS];/*bit/byte parameter with axis*/
short idatas[MAX_AXIS];/* word parameter with axis */
long ldatas[MAX_AXIS];/* 2-word parameter with axis */
REALPRM rdatas[MAX_AXIS];/* real parameter with axis */
} u;
} IODBPSD ; /* MAX_AXIS : max. controlled axes */
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of area to store parameter(length) is wrong. |
| EW_NUMBER |
Parameter number(datano) is wrong. |
| EW_ATTRIB |
Axis number(type) is wrong. |
| EW_NOOPT |
There is no option required for the specified parameter. ( Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i ) |
| EW_PROT |
|
| EW_PASSWD |
( Series 16i/18i/21i, 0i-A/B/C ) |
ncdata\cnc_wrpitchr
Writes the pitch error compensation data specified by "datano_s", "datano_e". The data must be stored in "data" array of "IODBPI" with signed binary format.
Available range of data
:
-7,..,7
Available range of data
:
-128,..,127
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrpitchr(unsigned short FlibHndl, short length, IODBPI *pitch);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| length | in |
Specify the data block length (size of IODBPI structure). 6+(number of pitch error compensation data) IODBPI
N : Number of pitch error compensation data |
| pitch | in |
Pointer to the IODBPI structure including the pitch error compensation data. The IODBPI structure is as follows.
typedef struct iodbpi {
short datano_s; /* start number of pitch error data */
short dummy; /* (not used) */
short datano_e; /* end number of pitch error data */
char data[N]; /* pitch error compensation data */
} IODBPI ; /* N : number of pitch error data */
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of IODBPI structure(length) is wrong. |
| EW_NUMBER |
Pitch error compensation data number(datano_s, datano_e) is wrong. |
| EW_DATA |
Pitch error compensation data(data) is out of range. |
| EW_NOOPT |
This function needs the pitch error compensation option. |
| EW_PROT |
CNC is not in the emergency stop. |
ncdata\cnc_wrpmacro
Writes the P code macro variable (variable for the macro-executor) specified by "number". The data must be stored in "mcr_val","dec_val" with signed binary format. It is possible to exchange the type of P code macro variable by cnc_setpmactype function. In case of the integer type variable, this indication is invalid and always regarded as the decimal form floating-point type. The value of an undefined variable is called "vacant", and it is expressed as follows both at decimal form floating-point type and at binary form floating-point type. mcr_val = 0 See the "PROGRAMING MANUAL" of the macro-executor for details of the P code macro variable.
mcr_val
:
value of variable (=M)
4-byte binary data with sign
(available range: 999999999,..,-999999999, integer type:-32768,..,32767)
dec_val
:
number of places of decimals (=E)
2-byte binary data with sign
(available range:-128,..,127, integer type : 0)
mcr_val
:
numerical part of variable (=M)
4-byte binary data with sign
(available range:No limitation)
dec_val
:
exponent part of variable (=E))
2-byte binary data with sign
(available range:-128,..,127)
dec_val = -1
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrpmacro(unsigned short FlibHndl, long number, long mcr_val, short dec_val);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| number | in |
Specify the P code macro variable number. See the description of cnc_rdpmacroinfo function about the available range. |
| mcr_val | in |
Specify the value of variable/numerical part of variable. |
| dec_val | in |
Specify the number of places of decimals/exponent part of variable. |
ERRORS
| Code | Description |
|---|---|
| EW_NUMBER |
P code macro variable number(number) is wrong. |
| EW_DATA |
Value of P code macro variable(mcr_val, dec_val) is out of available range. |
| EW_NOOPT |
This function needs the macro-executor option. |
| EW_PASSWD |
( Series 16i/18i/21i, 0i-A/B/C ) |
ncdata\cnc_wrpmacror
Writes the P code macro variable (variable for the macro-executor) specified by "datano_s", "datano_e". The data must be stored in "IODBPR" with signed binary format. It is possible to exchange the type of P code macro variable by cnc_setpmactype function. In case of the integer type variable, this indication is invalid and always regarded as the decimal form floating-point type. The value of an undefined variable is called "vacant", and it is expressed as follows both at decimal form floating-point type and at binary form floating-point type. mcr_val = 0 See the "PROGRAMING MANUAL" of the macro-executor for details of the P code macro variable.
mcr_val
:
value of variable (=M)
4-byte binary data with sign
(available range: 999999999,..,-999999999, integer type:-32768,..,32767)
dec_val
:
number of places of decimals (=E)
2-byte binary data with sign
(available range:-128,..,127, integer type : 0)
mcr_val
:
numerical part of variable (=M)
4-byte binary data with sign
(available range:No limitation)
dec_val
:
exponent part of variable (=E))
2-byte binary data with sign
(available range:-128,..,127)
dec_val = -1
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrpmacror(unsigned short FlibHndl, unsigned short length, IODBPR *pmacror);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| length | in |
Specify the data block length (size of IODBPR structure). 12+8*(Number of P code macro variable) IODBPR
N : Number of P code macro variable |
| pmacror | in |
Pointer to the IODBPR structure including the P code macro variable. The IODBPR structure is as follows.
typedef struct iodbpr {
long datano_s; /* start P code macro variable number*/
short dummy; /* (not used) */
long datano_e; /* end P code macro variable number */
struct {
long mcr_val; /* value of P code macro */
short dec_val; /* number of places of decimals */
} data[N]; /* N:Number of P code macro variable */
} IODBPR;
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of IODBPR structure(length) is wrong. |
| EW_NUMBER |
P code macro variable number(datano_s, datano_e) is wrong. |
| EW_DATA |
Value of P code macro variable(mcr_val, dec_val) is out of available range. |
| EW_NOOPT |
This function needs the macro-executor option. |
| EW_PASSWD |
( Series 16i/18i/21i, 0i-A/B/C ) |
ncdata\cnc_wrpmacror2
Writes the P code macro variables(variables for the macro-executor) specified by the starting number, "stnum", and number of variables, "*num". The data is stored in "pmacror" with double format. It is not influenced by setting of cnc_setpmactype function. The value of an undefined variable is called "vacant", and it is expressed as follows. 0xFFFFFFFFFFFFFFFF See the "PROGRAMING MANUAL" of the macro-executor for details of the P code macro variable.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrpmacror2(unsigned short FlibHndl, unsigned long stnum, unsigned long *num, unsigned short type, double *pmacror);
ARGUMENTS
| Name | Direction | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||
| stnum | in |
Specify the starting P code macro variable number. |
|||||||||
| num | in/out |
Specify pointer to the number of P code macro variable. |
|||||||||
| type | in |
|
|||||||||
| pmacror | in |
Specify the array for written P code macro variables. |
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
The number of P code macro variables(*num) is 0 or less. |
| EW_NUMBER |
P code macro variable number(stnum) is wrong. |
| EW_ATTRIB |
Type of P code macro variables(type) is wrong. |
| EW_NOOPT |
This function needs the macro-executor option. |
ncdata\cnc_wrrotvolc
Write the 3-dimensional rotary error compensation data by specified range.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrrotvolc( unsigned short FlibHndl, long start_no, long *num, IODBROTVOLC *rot_data );
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| start_no | in |
Specify the compensation number which the writing start. The range is 1-7812. |
| num | in/out |
Specify the writing number. The range is 1-13. |
| rot_data | in |
Pointer to the area including the 3-dimensional rotary error compensation data.
typedef struct iodbrotvolc {
long lin[3] ; /* translational errors[Cx,Cy,Cz] */
long rot[3] ; /* rotary errors[Cα,Cβ,Cγ] */
} IODBROTVOLC ;
For example, when 2 data from No.10 is updated, the set data becomes as follows. ODBROTVOLC *rot_data ; start_no = 10; num = 2; The 3-dimensional rotary error compensation data is set as follows. rot_data[0]->lin[0] Translational error compensation data of 1st axis in No.10. rot_data[0]->lin[1] Translational error compensation data of 2nd axis in No.10. rot_data[0]->lin[2] Translational error compensation data of 3rd axis in No.10. rot_data[0]->rot[0] Rotary error compensation data of 1st axis in No.10. rot_data[0]->rot[1] Rotary error compensation data of 2nd axis in No.10. rot_data[0]->rot[2] Rotary error compensation data of 3rd axis in No.10. rot_data[1]->lin[0] Translational error compensation data of 1st axis in No.11. rot_data[1]->lin[1] Translational error compensation data of 2nd axis in No.11. rot_data[1]->lin[2] Translational error compensation data of 3rd axis in No.11. rot_data[1]->rot[0] Rotary error compensation data of 1st axis in No.11. rot_data[1]->rot[1] Rotary error compensation data of 2nd axis in No.11. rot_data[1]->rot[2] Rotary error compensation data of 3rd axis in No.11. |
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_DATA |
In order to get more information for this return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
|||||||||
| EW_NOOPT |
This function needs the 3-dimensional rotary error compensation and the extended driver/library function option. |
ncdata\cnc_wrset
Writes the setting data specified by "datano","type"(only for the setting data with axis). The data format depends on each setting data. The format of Byte/Word/2-Word setting data is generally signed binary. Writes the setting data for all axes once by specifying 'ALL_AXES' in 'type'. The setting data for each axis must be stored in each array of "IODBPSD". The attribute of setting data depends on the type and axis, and it is different for each setting data. It is as follows, and can be got by cnc_rdsetinfo function. It is impossible to write any bit setting data bit by bit. 8 bits(i.e. 1 byte) which belong to the same setting data number are written at the same time. This function is the same as cnc_wrparam function except that it cannot write the parameter without setting attribute. See the "PARAMETER MANUAL" of CNC for details of each setting data.
Setting data type
Meaning
Byte size
Bit setting data
Every bits have each definition.
1
Bit setting data with axis
Every bits have each definition. (each axis)
1
Byte setting data
1-byte data is stored.
1
Byte setting data with axis
1-byte data is stored. (each axis)
1
Word setting data
2-byte data is stored.
2
Word setting data with axis
2-byte data is stored. (each axis)
2
2-Word setting data
4-byte data is stored.
4
2-Word setting data with axis
4-byte data is stored. (each axis)
4
Real setting data
(Series 15i, 30i, 0i-D/F, PMi-A)
4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored.
8
Real setting data with axis
(Series 15i, 30i, 0i-D/F, PMi-A)
4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored. (each axis)
8
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrset(unsigned short FlibHndl, short length, IODBPSD *set);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||
| length | in |
Specify the data block length(size of IODBPSD structure). 4+(byte size of setting data)*(number of axis) In case that the size of setting data is 4 byte, the IODBPSD structure is as follows. In case that its size is 1, 2, or 8 byte, the size of data part per 1 setting data or 1 axis is 1, 2, or 8 byte. IODBPSD
n = Maximum controlled axes
n = Current controlled axes In case of Series 15i, 16/18/21, 16i/18i/21i, 0i, 30i, Power Mate i and PMi-A, the spindle setting data has an axis attribute, and the data for number of spindle are valid. |
|||||||||||||||||||||||||||||||||
| set | in |
Pointer to the IODBPSD structure including the setting data. The IODBPSD structure is as follows.
Series 15, 16/18/21, 16i/18i/21i, 0i-A/B and Power Mate i
typedef struct iodbpsd {
short datano; /* setting data number */
short type; /* axis number */
union {
char cdata; /* bit/byte setting data */
short idata; /* word setting data */
long ldata; /* 2-word setting data */
char cdatas[MAX_AXIS]; /* bit/byte set. data with axis*/
short idatas[MAX_AXIS]; /* word setting data with axis */
long ldatas[MAX_AXIS]; /* 2-word set. data with axis */
} u ;
} IODBPSD ; /* MAX_AXIS : max. controlled axes */
Series 15i, 30i, 0i-D/F, PMi-A and Ethernet connection
typedef struct realprm { /* real setting data */
long prm_val; /* value of variable */
long dec_val; /* number of places of decimals */
} REALPRM;
typedef struct iodbpsd {
short datano; /* setting data number */
short type; /* upper byte:type */
/* lower byte:axis */
union {
char cdata; /* bit/byte setting data */
short idata; /* word setting data */
long ldata; /* 2-word setting data */
REALPRM rdata; /* real setting data */
char cdatas[MAX_AXIS];/*bit/byte set. data with axis*/
short idatas[MAX_AXIS];/* word set. data with axis */
long ldatas[MAX_AXIS];/* 2-word set. data with axis */
REALPRM rdatas[MAX_AXIS];/* real set. data with axis */
} u;
} IODBPSD ; /* MAX_AXIS : max. controlled axes */
|
|||||||||||||||||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||
| length | in |
Specify the data block length(size of IODBPSD structure). 4+(byte size of setting data)*(number of axis) In case that the size of setting data is 4 byte, the IODBPSD structure is as follows. In case that its size is 1, 2, or 8 byte, the size of data part per 1 setting data or 1 axis is 1, 2, or 8 byte. IODBPSD
The spindle setting data has an axis attribute, and the data for number of spindle are valid. |
|||||||||||||||||||||||||||||||||
| set | in |
Pointer to the IODBPSD structure including the setting data. The IODBPSD structure is as follows.
typedef struct realprm { /* real setting data */
long prm_val; /* value of variable */
long dec_val; /* number of places of decimals */
} REALPRM;
typedef struct iodbpsd {
short datano; /* setting data number */
short type; /* axis */
union {
char cdata; /* bit/byte setting data */
short idata; /* word setting data */
long ldata; /* 2-word setting data */
REALPRM rdata; /* real setting data */
char cdatas[MAX_AXIS];/*bit/byte set. data with axis*/
short idatas[MAX_AXIS];/* word set. data with axis */
long ldatas[MAX_AXIS];/* 2-word set. data with axis */
REALPRM rdatas[MAX_AXIS];/* real set. data with axis */
} u;
} IODBPSD ; /* MAX_AXIS : max. controlled axes */
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of IODBPSD structure(length) is wrong. |
| EW_NUMBER |
Setting data number(datano) is wrong. |
| EW_ATTRIB |
Axis number(type) is wrong. |
| EW_NOOPT |
There is no option required for the specified setting data. ( Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i ) |
ncdata\cnc_wrsets
Writes all setting data stored in "set". The data format depends on each setting data. The format of Byte/Word/2-Word setting data is generally signed binary. Writes the setting data for all axes once by specifying 'ALL_AXES' in 'type'. The setting data for each axis must be stored in each array of "IODBPSD". The attribute of setting data depends on the type and axis, and it is
different for each setting data. It is as follows, and can be got by cnc_rdsetinfo function. It is impossible to write any bit setting data bit by bit. 8 bits(i.e. 1 byte) which belong to the same setting data number are written at the same time. This function is the same as cnc_wrparas function except that it cannot write the parameter without setting attribute. See the "PARAMETER MANUAL" of CNC for details of each setting data.
Setting data type
Meaning
Byte size
Bit setting data
Every bits have each definition.
1
Bit setting data with axis
Every bits have each definition. (each axis)
1
Byte setting data
1-byte data is stored.
1
Byte setting data with axis
1-byte data is stored. (each axis)
1
Word setting data
2-byte data is stored.
2
Word setting data with axis
2-byte data is stored. (each axis)
2
2-Word parameter
4-byte data is stored.
4
2-Word parameter with axis
4-byte data is stored. (each axis)
4
Real setting data
(Series 15i, 30i, 0i-D/F, PMi-A)
4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored.
8
Real setting data with axis
(Series 15i, 30i, 0i-D/F, PMi-A)
4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored. (each axis)
8
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrsets(unsigned short FlibHndl, short length, void *set);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||
| length | in |
Specify the data block length which is enough to store the specified setting data. The structure per 1 setting data is as follows, and each setting data must be lined up in order of number. [= Sum of (4+(byte size of each setting data) *(number of axis))] In case that the size of setting data is 2 byte, the IODBPSD structure is as follows. In case that the size of setting data is 1 or 2 byte and the length per 1 setting data is not a multiple of 4, 'dummy' is necessary in the end of structure. In case that its size is 4 or 8 byte, the size of data part per 1 setting data or 1 axis is 4 or 8 byte, and so 'dummy' is not necessary. IODBPSD
n = Maximum controlled axes In case of Series 15i, 16/18/21, 16i/18i/21i, 0i, 30i, Power Mate i and PMi-A, the spindle setting data has an axis attribute, and the data for number of spindle are valid. |
||||||||||||||||||||||||
| set | in |
Pointer to the area to store the setting data. Each setting data can be referred by using the IODBPSD structure.
Series 15, 16/18/21, 16i/18i/21i, 0i-A/B and Power Mate i
typedef struct iodbpsd {
short datano; /* setting data number */
short type; /* upper byte:type */
/* lower byte:axis */
union {
char cdata; /* bit/byte setting data */
short idata; /* word setting data */
long ldata; /* 2-word setting data */
char cdatas[MAX_AXIS]; /* bit/byte set. data with axis*/
short idatas[MAX_AXIS]; /* word setting data with axis*/
long ldatas[MAX_AXIS]; /* 2-word set. data with axis */
} u ;
} IODBPSD ; /* MAX_AXIS : max. controlled axes */
Series 15i, 30i, 0i-D/F, PMi-A and Ethernet connection
typedef struct realprm { /* real setting data */
long prm_val; /* value of variable */
long dec_val; /* number of places of decimals */
} REALPRM;
typedef struct iodbpsd {
short datano; /* setting data number */
short type; /* upper byte:type */
/* lower byte:axis */
union {
char cdata; /* bit/byte setting data */
short idata; /* word setting data */
long ldata; /* 2-word setting data */
REALPRM rdata; /* real setting data */
char cdatas[MAX_AXIS];/*bit/byte set. data with axis*/
short idatas[MAX_AXIS];/* word set. data with axis */
long ldatas[MAX_AXIS];/* 2-word set. data with axis */
REALPRM rdatas[MAX_AXIS];/* real set. data with axis */
} u;
} IODBPSD ; /* MAX_AXIS : max. controlled axes */
|
||||||||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||
| length | in |
Specify the data block length which is enough to store the specified setting data. The structure per 1 setting data is as follows, and each setting data must be lined up in order of number. [= Sum of (4+(byte size of each setting data) *(number of axis))] In case that the size of setting data is 2 byte, the IODBPSD structure is as follows. In case that the size of setting data is 1 or 2 byte and the length per 1 setting data is not a multiple of 4, 'dummy' is necessary in the end of structure. In case that its size is 4 or 8 byte, the size of data part per 1 setting data or 1 axis is 4 or 8 byte, and so 'dummy' is not necessary. IODBPSD
The spindle setting data has an axis attribute, and the data for number of spindle are valid. |
||||||||||||||||||||||||
| set | in |
Pointer to the area to store the setting data. Each setting data can be referred by using the IODBPSD structure.
typedef struct realprm { /* real setting data */
long prm_val; /* value of variable */
long dec_val; /* number of places of decimals */
} REALPRM;
typedef struct iodbpsd {
short datano; /* setting data number */
short type; /* upper byte:type */
/* lower byte:axis */
union {
char cdata; /* bit/byte setting data */
short idata; /* word setting data */
long ldata; /* 2-word setting data */
REALPRM rdata; /* real setting data */
char cdatas[MAX_AXIS];/*bit/byte set. data with axis*/
short idatas[MAX_AXIS];/* word set. data with axis */
long ldatas[MAX_AXIS];/* 2-word set. data with axis */
REALPRM rdatas[MAX_AXIS];/* real set. data with axis */
} u;
} IODBPSD ; /* MAX_AXIS : max. controlled axes */
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of area to store setting data(length) is wrong. |
| EW_NUMBER |
Setting data number(datano) is wrong. |
| EW_ATTRIB |
Axis number(type) is wrong. |
| EW_NOOPT |
There is no option required for the specified setting data. ( Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i ) |
ncdata\cnc_wrtofs
Writes the tool offset value specified by "number", "type". The offset value must be stored in "data" with signed binary format. The unit of offset value is as follows. The available range of offset value is as follows.
6007#0
(ONM)6004#0
(OUF)6002#1
(OFN)6002#0
(ORG)Linear axis
mm input
[mm]Linear axis
inch input
[inch]Rotation axis
[deg]
0
0
0
1
0.01
0.001
0.01
0
0
0
0
0.001
0.0001
0.001
0
0
1
0
0.0001
0.00001
0.0001
0
1
0
0
0.00001
0.000001
0.00001
1
0
0
0
0.000001
0.0000001
0.000001
6007#0
(OFE)6004#0
(OFD)6002#1
(OFC)6002#0
(OFA)Linear axis
mm input
[mm]Linear axis
inch input
[inch]Rotation axis
[deg]
0
0
0
1
0.01
0.001
0.01
0
0
0
0
0.001
0.0001
0.001
0
0
1
0
0.0001
0.00001
0.0001
0
1
0
0
0.00001
0.000001
0.00001
1
0
0
0
0.000001
0.0000001
0.000001
IS-A is effective for Power Mate i-H.
1004#1
(ISC)1004#0
(ISA)Linear axis
mm input
[mm]Linear axis
inch input
[inch]Rotation axis
[deg]
IS-A
0
1
0.01
0.001
0.01
IS-B
0
0
0.001
0.0001
0.001
IS-C
1
0
0.0001
0.00001
0.0001
IS-C is effective for Power Mate i-D.
5042#1
(OFC)5042#0
(OFA)Linear axis
mm input
[mm]Linear axis
inch input
[inch]Rotation axis
[deg]
0
1
0.01
0.001
0.01
0
0
0.001
0.0001
0.001
1
0
0.0001
0.00001
0.0001
5042#3
(OFE)5042#2
(OFD)5042#1
(OFC)5042#0
(OFA)Linear axis
mm input
[mm]Linear axis
inch input
[inch]Rotation axis
[deg]
0
0
0
1
0.01
0.001
0.01
0
0
0
0
0.001
0.0001
0.001
0
0
1
0
0.0001
0.00001
0.0001
0
1
0
0
0.00001
0.000001
0.00001
1
0
0
0
0.000001
0.0000001
0.000001
* () : Extended tool offset value option
6007#0
(ONM)6004#0
(OUF)6002#1
(OFN)6002#0
(ORG)Linear axis
mm input
[mm]Linear axis
inch input
[inch]Rotation axis
[deg]
0
0
0
1
± 999.99
(±9999.99)± 99.999
(±999.999)± 999.99
(±9999.99)
0
0
0
0
± 999.999
(±9999.999)± 99.9999
(±999.9999)± 999.999
(±9999.999)
0
0
1
0
± 999.9999
(±9999.9999)± 99.99999
(±999.99999)± 999.9999
(±9999.9999)
0
1
0
0
± 99.99999
(±9999.99999)± 9.999999
(±999.999999)± 99.99999
(±9999.99999)
1
0
0
0
± 9.999999
(±999.999999)± 0.9999999
(±99.9999999)± 9.999999
(±999.999999)
6007#0
(OFE)6004#0
(OFD)6002#1
(OFC)6002#0
(OFA)Linear axis
mm input
[mm]Linear axis
inch input
[inch]Rotation axis
[deg]
0
0
0
1
±9999.99
±999.999
±9999.99
0
0
0
0
±9999.999
±999.9999
±9999.999
0
0
1
0
±9999.9999
±999.99999
±9999.9999
0
1
0
0
±9999.99999
±999.999999
±9999.99999
1
0
0
0
± 999.999999
± 99.9999999
± 999.999999
* () : Wear offset
1004#1
(ISC)1004#0
(ISA)Linear axis
mm input
[mm]Linear axis
inch input
[inch]Rotation axis
[deg]
IS-A
0
1
± 999.99
(± 99.99)± 99.999
(± 9.999)± 999.99
(± 99.99)
IS-B
0
0
± 999.999
(± 99.999)± 99.9999
(± 9.9999)± 999.999
(± 99.999)
IS-C
1
0
± 999.9999
(± 99.9999)± 99.99999
(± 9.99999)± 999.9999
(± 99.9999)
IS-A is effective for Power Mate i-H.
IS-C is effective for Power Mate i-D.
5042#1
(OFC)5042#0
(OFA)Linear axis
mm input
[mm]Linear axis
inch input
[inch]Rotation axis
[deg]
0
1
±9999.99
±999.999
±9999.99
0
0
±9999.999
±999.9999
±9999.999
1
0
±9999.9999
±999.99999
±9999.9999
5042#3
(OFE)5042#2
(OFD)5042#1
(OFC)5042#0
(OFA)Linear axis
mm input
[mm]Linear axis
inch input
[inch]Rotation axis
[deg]
0
0
0
1
±9999.99
±999.999
±9999.99
0
0
0
0
±9999.999
±999.9999
±9999.999
0
0
1
0
±9999.9999
±999.99999
±9999.9999
0
1
0
0
±9999.99999
±999.999999
±9999.99999
1
0
0
0
±999.999999
±99.9999999
±999.999999
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrtofs(unsigned short FlibHndl, short number, short type, short length, long data);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| number | in |
Specify the tool offset number. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type | in |
Specify the tool offset type. (see the following table)
When the tool offset for milling and turning function option is effective, specify the following type.(Series 30i)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| length | in |
Specify 8. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| data | in |
Set the tool offset value. |
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size (length) is not 8. |
| EW_NUMBER |
Offset number (number) is wrong. |
| EW_ATTRIB |
Offset type (type) is wrong. |
| EW_ALARM |
Offset data is out of range of the wrong operation prevention functions. |
| EW_DATA |
Offset data (data) is out of range. |
ncdata\cnc_wrtofsr
Writes the tool offset value specified by "datano_s","datano_e","type".
The offset value must be stored in "IODBTO" with signed binary format.
The unit of offset value is the same as "Write tool offset value(cnc_wrtofs)". See the description of cnc_wrtofs function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrtofsr(unsigned short FlibHndl, short length, IODBTO *tofsr);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| length | in |
Specify the data block length. |
| tofsr | in |
Pointer to the IODBTO structure including the tool offset value. The IODBTO structure is as follows.
typedef struct iodbto {
short datano_s; /* start offset number */
short type; /* offset type */
short datano_e; /* end offset number */
union {
long m_ofs[N]; /* M series individual */
long m_ofs_a[N]; /* M series Memory A all */
long m_ofs_b[2*N]; /* M series Memory B all */
long m_ofs_c[4*N]; /* M series Memory C all */
struct {
short tip ;
long data[1] ;
} m_ofs_at[N] ; /* M series Memory A all with direction of imaginary tool nose */
struct {
short tip ;
long data[2] ;
} m_ofs_bt[N] ; /* M series Memory B all with direction of imaginary tool nose */
struct {
short tip ;
long data[4] ;
} m_ofs_ct[N] ; /* M series Memory C all with direction of imaginary tool nose */
short t_tip[N]; /* T series individual,direction of imaginary tool nose */
long t_ofs[N]; /* T series individual */
struct {
short tip;
long data[4];
} t_ofs_a[N]; /* T series Memory A all */
struct {
short tip;
long data[8];
} t_ofs_b[N]; /* T series Memory B all */
long t_ofs_2g[3*N]; /* T series Second geometry all */
long m_ofs_cnr[10]; /* M-CornerR */
struct {
long data[2];
} t_ofs_ex[N]; /* T series 4th/5th Axis Offset Function all */
} u ;
} IODBTO ; /* N is number of the offset value. */
The combinations of the value specified in "type", the data block length "length", the kind of offset value to be written and the member in which the offset value must be stored are the same as "Read tool offset value(area specified)(cnc_rdtofsr)". See the description of cnc_rdtofsr function. |
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of ODBTOFS structure(length) is wrong. |
| EW_NUMBER |
Offset number(datano_s,datano_e) is wrong. |
| EW_ATTRIB |
Offset type(type) is wrong. |
| EW_ALARM |
Offset data is out of range of the wrong operation prevention functions. |
| EW_DATA |
Offset data(data,etc.) is out of range. |
ncdata\cnc_wrvolc
Writes the 3-dimensional error compensation data by specified range.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrvolc(unsigned short FlibHndl,ODBVOLC *volc, long *data);
ARGUMENTS
| Name | Direction | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||
| volc | in |
Pointer to the ODBTOFS structure including the writing information of 3-dimensional error compensation data. The ODBVOLC structure is as follows.
typedef struct odbvolc {
long start_no ; /* Writing start compensation number */
long start_ax ; /* Writing start axis index */
long end_no ; /* Writing end compensation number */
long end_ax ; /* Writing end axis index */
long num ; /* Writing number */
char type ; /* 0:Write by number 1:Write by end number specification */
long data[72] ; /* Reserved */
} ODBVOLC ;
When type=1 is specified for the writing method type, specify the other argument to become the following. 1 <= ((end_no - start_no) * 3 + (end_ax - start_ax) + 1) <= 78 |
||||||||||||
| data | in |
Pointer to the area including the 3-dimensional error compensation data. The number of maximum data which can write is 78. (Maximum size is data[78].) The range of compensation data is -128 to 127. Data is stored in order of the 1st axis, 2nd axis and the 3rd axis from the little number. For example, when the data from the 2nd axis in No.3 to the 1st axis in No.8 is updated by the end number specification, the set data becomes as follows. ODBVOLC volc ; long data[78] ; volc.start_no = 3 volc.start_ax = 2 volc.end_no = 10 volc.end_ax = 1 volc.type = 1(end number specification)
|
ERRORS
| Code | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_DATA |
In order to get more information for this return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
||||||||||||||||||||||||
| EW_NOOPT |
This function needs the 3-dimensional error compensation and the extended driver/library function option. |
ncdata\cnc_wrwkcdsfms
Writes the work coordinate shift measured value specified by "type".
The work coordinate shift measured value must be stored in "data" array
of "IODBWCSF" with signed binary format. The value for all axes can be
written at a time by specifying ALL_AXES for "type".
The unit of work coordinate shift measured value is the same as "Read
work coordinate shift value( cnc_rdwkcdshft )". See the description of cnc_rdwkcdshft function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrwkcdsfms(unsigned short FlibHndl, short length, IODBWCSF *wkcdsfms);
ARGUMENTS
| Name | Direction | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||
| length | in |
Specify the data block length(size of IODBWCSF structure). IODBWCSF
n = Maximum controlled axes (The data for current controlled axes are valid.) n = Current controlled axes |
||||||||||||
| wkcdsfms | in |
Pointer to the IODBWCSF structure for the work coordinate shift measured value. The IODBWCSF structure is as follows.
typedef struct iodbwcsf {
short dummy; /* (not used) */
short type; /* axis number */
long data[MAX_AXIS];/* work coordinate shift */
/* measured value */
} IODBWCSF ; /* MAX_AXIS : max. controlled axes */
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used at M series. |
| EW_LENGTH |
Size of IODBWCSF structure(length) is wrong. |
| EW_ATTRIB |
Axis number(type) is wrong. |
| EW_DATA |
Work coordinate shift measured value(data) is out of range. In order to get more information for this err_no return value, execute cnc_getdtailerr function. The axis number(0 -) at which error occurred will be set onto the member, err_dtno of ODBERR structure. |
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_PROT |
CNC parameter '3290#3' must be 0. |
| EW_PARAM |
CNC parameter '1201#6' must be 0. |
| EW_REJECT |
STL(DO) is on. |
ncdata\cnc_wrwkcdshft
Writes the work coordinate shift value specified by "type".
The work coordinate shift value must be stored in "data" array of
"IODBWCSF" with signed binary format. The value for all axes can be
written at a time by specifying ALL_AXES for "type". The unit of work coordinate shift value is the same as "Read work
coordinate shift value( cnc_rdwkcdshft )". See the description of
cnc_rdwkcdshft function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrwkcdshft(unsigned short FlibHndl, short length, IODBWCSF *wkcdshft);
ARGUMENTS
| Name | Direction | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||
| length | in |
Specify the data block length(size of IODBWCSF structure). IODBWCSF
n = Maximum controlled axes (The data for current controlled axes are valid.) n = Current controlled axes |
||||||||||||
| wkcdshft | in |
Pointer to the IODBWCSF structure for the work coordinate shift value. The IODBWCSF structure is as follows.
typedef struct iodbwcsf {
short dummy; /* (not used) */
short type; /* axis number */
long data[MAX_AXIS];/* work coordinate shift value*/
} IODBWCSF ; /* MAX_AXIS : max. controlled axes */
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used at M series. |
| EW_LENGTH |
Size of IODBWCSF structure(length) is wrong. |
| EW_ATTRIB |
Axis number(type) is wrong. |
| EW_DATA |
Work coordinate shift value(data) is out of range. In order to get more information for this err_no return value, execute cnc_getdtailerr function. The axis number(0 -) at which error occurred will be set onto the member, err_dtno of ODBERR structure. |
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_PROT |
CNC parameter '3290#3' must be 0. |
| EW_PARAM |
CNC parameter '1201#6' must be 0. |
| EW_REJECT |
STL(DO) is on. |
ncdata\cnc_wrzofs
Writes the work zero offset value specified by "datano", "type". The offset value must be stored in "data[0]" of "IODBZOFS" with signed binary format. Writes the offset value for all axes once by specifying 'ALL_AXES' in 'type'. The offset value for each axis must be stored in "data" array of "IODBZOFS".
The unit of offset value is the same as "Read work zero offset value(cnc_rdzofs)".
See the description of cnc_rdzofs function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrzofs(unsigned short FlibHndl, short length, IODBZOFS *zofs);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||
| length | in |
Specify the data block length(size of IODBZOFS structure). IODBZOFS
n = Maximum controlled axes (The data for current controlled axes are valid.)
n = Current controlled axes |
|||||||||||||||||||||||||||||||||||||||||||||||
| zofs | in |
Pointer to the IODBZOFS structure including the work zero offset value. The IODBZOFS structure is as follows.
typedef struct iodbzofs {
short datano; /* offset number */
short type; /* axis number */
long data[MAX_AXIS]; /* offset data value */
} IODBZOFS ; /* MAX_AXIS : max. controlled axes */
|
|||||||||||||||||||||||||||||||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||
| length | in |
Specify the data block length(size of IODBZOFS structure). IODBZOFS
|
|||||||||||||||||||||||||||||||||||||||||||||||
| zofs | in |
Pointer to the IODBZOFS structure including the work zero offset value. The IODBZOFS structure is as follows.
typedef struct iodbzofs {
short datano; /* offset number */
short type; /* axis number */
long data[MAX_AXIS]; /* offset data value */
} IODBZOFS ; /* MAX_AXIS : max. controlled axes */
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of IODBZOFS structure(length) is wrong. |
| EW_NUMBER |
Offset number(datano) is wrong. |
| EW_ATTRIB |
Axis number(type) is wrong. |
| EW_DATA |
Offset data(data) is out of range. |
| EW_NOOPT |
This function needs the work zero offset option. |
ncdata\cnc_wrzofsr
Writes the work zero offset value specified by "datano_s", "datano_e", "type". The offset value must be stored in "data" array of "IODBZOR" with signed binary format. The unit of offset value is the same as "Read work zero offset value(cnc_rdzofs)". See the description of cnc_rdzofs function. As for Series 16i/18i-W, the unit of offset value is as follows.
Writes the offset value for all axes once by specifying 'ALL_AXES' in 'type'.
1004#1
(ISC)1004#0
(ISA)Linear axis
mm input
[mm]Linear axis
inch input
[inch]Rotation axis
[deg]
IS-A
0
1
0.01
0.001
0.01
IS-B
0
0
0.001
0.0001
0.001
IS-C
1
0
0.0001
0.00001
0.0001
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrzofsr(unsigned short FlibHndl, short length, IODBZOR *zofsr);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
| length | in |
Specify the data block length(size of IODBZOR structure). IODBZOR
n = Maximum controlled axes (* The data for current controlled axes are valid.) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
| zofsr | in |
Pointer to the IODBZOR structure including the work zero offset value. The IODBZOR structure is as follows.
typedef struct iodbzor {
short datano_s; /* start offset number */
short type; /* axis number */
short datano_e; /* end offset number */
long data[MAX_AXIS*K];/* offset data value */
} IODBZOR ; /* MAX_AXIS : max. controlled axes */
/* K : number of offset */
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
| length | in |
Specify the data block length(size of IODBZOR structure). IODBZOR
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
| zofsr | in |
Pointer to the IODBZOR structure including the work zero offset value. The IODBZOR structure is as follows.
typedef struct iodbzor {
short datano_s; /* start offset number */
short type; /* axis number */
short datano_e; /* end offset number */
long data[MAX_AXIS*K];/* offset data value */
} IODBZOR ; /* MAX_AXIS : max. controlled axes */
/* K : number of offset */
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of IODBZOR structure(length) is wrong. |
| EW_NUMBER |
Offset number(datano_s, datano_e) is wrong. |
| EW_ATTRIB |
Axis number(type) is wrong. |
| EW_DATA |
Offset data(data) is out of range. |
| EW_NOOPT |
This function needs the work zero offset option. |
ncdata\cnc_zofs_rnge
Reads the effective setting range of work zero offset value specified
by "number", "axis". The unit of offset value is as follows.
The effective setting range is stored in "data_min", "data_max" of
ODBDATRNG with signed binary format.
1013#3
(ISE)1013#2
(ISD)1013#1
(ISC)1013#0
(ISA)Linear axis
mm input
[mm]Linear axis
inch input
[inch]
IS-A
0
0
0
1
0.01
0.001
IS-B
0
0
0
0
0.001
0.0001
IS-C
0
0
1
0
0.0001
0.00001
IS-D
0
1
0
0
0.00001
0.000001
IS-E
1
0
0
0
0.000001
0.0000001
| 1013#1 (ISC) |
1013#0 (ISA) |
Linear axis mm input [mm] |
Linear axis inch input [inch] |
|
|---|---|---|---|---|
| IS-A | 0 | 1 | 0.01 | 0.001 |
| IS-B | 0 | 0 | 0.001 | 0.0001 |
| IS-C | 1 | 0 | 0.0001 | 0.00001 |
PROTOTYPE
FWLIBAPI short WINAPI cnc_zofs_rnge(unsigned short FlibHndl,short number, short axis,ODBDATRNG *zofsr);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||
| number | in |
Specify the work zero offset number.
|
||||||||||||||||||
| axis | in |
Specify the axis number to be read.
|
||||||||||||||||||
| zofsr | out |
Specify the pointer of the ODBDATRNG structure that stores the upper and lower limit of work zero offset value. The ODBDATRNG structure is as follows.
typedef struct odbdatrng {
long data_min ; /* lower limit */
long data_max ; /* upper limit */
long status; /* status of setting value */
} ODBDATRNG ;
|
ERRORS
| Code | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_NUMBER |
Offset number(number) is wrong. |
||||||||||||
| EW_ATTRIB |
Axis number(axis) is wrong. |
||||||||||||
| EW_NOOPT |
This function needs the work zero offset option. |
||||||||||||
| EW_DATA |
In order to get more information for this return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
pmc\pmc_crdmsg
Reads the data of 32 bytes transmitted from the PMC.
It is necessary to transmit the data on the PMC side to read the data.
If the data is not transmitted from the PMC, the error(Return: EW_BUFFER) is returned.
The data is stored in the data array.
The meaning of the data can be decided by the each application of the PMC and the MMC.
The outline of each processing is as follows.
Note)
When the MMC side processing is late, the completion status on the PMC side is <-10>.
See the "PROGRAMMING MANUAL" of PMC for details of the PMC side processing.
PROTOTYPE
FWLIBAPI short WINAPI pmc_crdmsg(unsigned short FlibHndl, short *length,short *data);
ARGUMENTS
| Name | Direction | Description | ||
|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. |
||
| length | in/out |
Specify the pointer to the reception data length. |
||
| data | out |
Specify the pointer to the reception data storage area.
|
ERRORS
| Code | Description |
|---|---|
| EW_NOPMC |
|
| EW_BUFFER |
The PMC side does not transmit the data or the transmission processing is late, therefore the data cannot be received. |
pmc\pmc_cwrmsg
Writes the data of 32 bytes transmitted to the PMC.
It is necessary to receive the data on the PMC side to write the data.
If the PMC side does not receive the data, the error(Return:EW_BUFFER) is returned.
The data must be stored in the data array.
The meaning of the data can be decided by the each application of the PMC and the MMC.
The outline of each processing is as follows.
Note)
When the MMC side processing is late, the completion status on the PMC side is <-10>.
See the "PROGRAMMING MANUAL" of PMC for details of the PMC side processing.
PROTOTYPE
FWLIBAPI short WINAPI pmc_cwrmsg(unsigned short FlibHndl, short length,short *data);
ARGUMENTS
| Name | Direction | Description | ||
|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. |
||
| length | in |
Specify the data block length of the transmission data. |
||
| data | in |
Specify the pointer to the transmission data storage area.
|
ERRORS
| Code | Description |
|---|---|
| EW_NOPMC |
|
| EW_LENGTH |
Data length(length) is wrong. |
| EW_BUFFER |
The PMC side does not receive the data or the reception processing is late, therefore the data cannot be transmitted. |
pmc\pmc_get_current_pmc_unit
PROTOTYPE
FWLIBAPI short WINAPI pmc_get_current_pmc_unit ( unsigned short FlibHndl, long * unittype );
ARGUMENTS
| Name | Direction | Description | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||
| unittype | out |
|
ERRORS
| Code | Description |
|---|---|
| EW_NOPMC |
|
pmc\pmc_get_number_of_pmc
PROTOTYPE
FWLIBAPI short WINAPI pmc_get_number_of_pmc ( unsigned short FlibHndl, long * number );
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| number | out |
|
ERRORS
| Code | Description |
|---|
pmc\pmc_get_pmc_unit_types
PROTOTYPE
FWLIBAPI short WINAPI pmc_get_pmc_unit_types ( unsigned short FlibHndl, long unittypes[], long * count );
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||
| unittypes | out |
The maximum number of PMC paths is 6, and the actual number of PMC paths can be got by pmc_get_number_of_pmc. Each element of the array shows the "Unit Type" of the PMC path as following values.
The PMC unit type can be got from this array by using the PMC path number as the index. |
||||||||||||||||
| count | in/out |
Before calling this function, set the element number of the array, unittypes[], where this pointer shows. This function returns the number of elements (number of PMC paths) that is actually got, storing to this pointer. |
ERRORS
| Code | Description |
|---|
pmc\pmc_get_timer_type
Reads the PMC timer type of the specified timer number.
PROTOTYPE
FWLIBAPI short WINAPI pmc_get_timer_type(unsigned short FlibHndl,
unsigned short s_no, unsigned short e_no, short *type);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||
| s_no | in |
Specify the start PMC timer number(1-250). |
||||||||||||||||||||||||
| e_no | in |
Specify the end PMC timer number(1-250). |
||||||||||||||||||||||||
| type | out |
The timer type is as follows.
|
ERRORS
| Code | Description |
|---|---|
| EW_RANGE |
PMC timer number(s_no, e_no) is wrong. |
pmc\pmc_getdtailerr
Gets the detailed error information after the function has been executed. The detailed error information is stored in "err_no", "err_dtno" of "ODBPMCERR".
PROTOTYPE
FWLIBAPI short WINAPI pmc_getdtailerr(unsigned short FlibHndl, ODBPMCERR *err);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| err | out |
The ODBPMCERR structure is as follows.
typedef struct odbpmcerr{
short err_no; /* Detail error */
short err_dtno; /* Data number on error */
} ODBPMCERR ;
|
ERRORS
| Code | Description |
|---|
pmc\pmc_kpmsiz
Reads the maximum size of the extended backup memory.
PROTOTYPE
FWLIBAPI short WINAPI pmc_kpmsiz(unsigned short FlibHndl, unsigned long *size);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. |
| size | out |
|
ERRORS
| Code | Description |
|---|---|
| EW_NOPMC |
|
| EW_NOOPT |
This function needs the extended backup memory option. |
pmc\pmc_rdalmmsg
Reads the alarm messages from PMC.
PROTOTYPE
FWLIBAPI short WINAPI pmc_rdalmmsg(unsigned short FlibHndl, short s_number, short *read_num, short *exist, ODBPMCALM *pmcalm);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. |
||||||||||||||||||||||||||||
| s_number | in |
|
||||||||||||||||||||||||||||
| read_num | in/out |
Specify the number of alarm messages to be read before function call and actual number of alarm messages being read is stored after the function call. |
||||||||||||||||||||||||||||
| exist | out |
If the alarm still exists, it is possible to read the remained PMC alarms by setting "s_number = s_number + read_num" and calling this function again. |
||||||||||||||||||||||||||||
| pmcalm | out |
The number of array must be required so as to store the PMC alarms specified by 'read_num'. The ODBPMCALM structure is as follows.
Type MyODBPMCALM
nOdb_pmcalm(0 To 9) As ODBPMCALM
End Type ' In case that the read_num is 10.
|
ERRORS
| Code | Description |
|---|---|
| EW_NOPMC |
|
| EW_NUMBER |
The specification of the starting number (s_number) is wrong. |
| EW_DATA |
data(read_num) is out of range. |
pmc\pmc_rdcntldata
Reads the control data to manage PMC data table (address D). This function is not available at PMC-NA. Refer to the programming manual of PMC(ladder language) concerning the details of output arguments.
PROTOTYPE
FWLIBAPI short WINAPI pmc_rdcntldata(unsigned short FlibHndl, short s_number, short e_number, short length, IODBPMCCNTL *pmccntl);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||
| s_number | in |
|
||||||||||||||||||||||||||||||
| e_number | in |
|
||||||||||||||||||||||||||||||
| length | in |
Specify the length of data block. IODBPMCCNTL
N is the number of group to be read. |
||||||||||||||||||||||||||||||
| pmccntl | out |
The IODBPMCCNTL structure is as follows.
typedef struct iodbpmccntl {
short datano_s ; /* start group number */
short dummy ; /* (not used) */
short datano_e ; /* end group number */
struct {
char tbl_prm ; /* table parameter */
char data_type ; /* data type */
unsigned short data_size ;
/* size of data in group */
unsigned short data_dsp ;
/* address of data in group */
short dummy ; /* (not used) */
} info[N] ; /* N : number of messages to be read */
} IODBPMCCNTL ;
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of IODBPMCCNTL structure(length) is wrong. |
| EW_NUMBER |
Group number(s_number,e_number) is wrong. |
| EW_NOOPT |
The extended driver/library function is necessary. |
pmc\pmc_rdcntlgrp
Reads the total number of groups of the control data to manage PMC data table(address D). This function is not available at PMC-NA.
PROTOTYPE
FWLIBAPI short WINAPI pmc_rdcntlgrp(unsigned short FlibHndl, short *grp_no);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| grp_no | out |
After executing this function, the number of group which was read actually is set. |
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The extended driver/library function is necessary. |
pmc\pmc_rdkpm
Reads the contents of the extended backup memory of PMC specified by "offset", "length".
The data are stored in "data" with the same format with PMC.
PROTOTYPE
FWLIBAPI short WINAPI pmc_rdkpm(unsigned short FlibHndl, unsigned long offset,char *data,unsigned short length);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. |
| offset | in |
The top of the extended backup memory is indicated by '0'. |
| data | out |
The array is as follows. char data[65535] ; |
| length | in |
|
ERRORS
| Code | Description |
|---|---|
| EW_NOPMC |
|
| EW_LENGTH |
Size of data(length) is wrong. |
| EW_RANGE |
Start address(offset) is wrong. |
| EW_NOOPT |
This function needs the extended backup memory option. |
pmc\pmc_rdkpm2
Reads the contents of the extended backup memory of PMC specified by "offset", "length".
The data are stored in "data" with the same format with PMC.
PROTOTYPE
FWLIBAPI short WINAPI pmc_rdkpm2(unsigned short FlibHndl, unsigned long offset,char *data,unsigned long length);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. |
| offset | in |
The top of the extended backup memory is indicated by '0'. |
| data | out |
The array is as follows. char data[65535] ; |
| length | in |
|
ERRORS
| Code | Description |
|---|---|
| EW_NOPMC |
|
| EW_LENGTH |
Size of data(length) is wrong. |
| EW_RANGE |
Start address(offset) is wrong. |
| EW_NOOPT |
This function needs the PMC C language nonvolatile memory expansion or PMC C language nonvolatile memory expansion(256K) option. |
pmc\pmc_rdmsg
Reads the data of 32 bytes transmitted from the PMC.
It is necessary to transmit the data on the PMC side to read the data.
If the data is not transmitted from the PMC, it waits in the library.
The data is stored in the data array.
The meaning of the data can be decided by the each application of the PMC and the MMC.
The outline of each processing is as follows.
Note)
When the MMC side processing is late, the completion status on the PMC side is <-10>.
See the "PROGRAMMING MANUAL" of PMC for details of the PMC side processing.
PROTOTYPE
FWLIBAPI short WINAPI pmc_rdmsg(unsigned short FlibHndl,short *length, short *data);
ARGUMENTS
| Name | Direction | Description | ||
|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. |
||
| length | in/out |
Specify the pointer to the reception data length. |
||
| data | in |
Specify the pointer to the reception data storage area.
|
ERRORS
| Code | Description |
|---|---|
| EW_NOPMC |
|
pmc\pmc_rdpmcinfo
Reads the data information about the attribute of each kind of PMC, the effective range of PMC address, etc.
PROTOTYPE
FWLIBAPI short WINAPI pmc_rdpmcinfo(unsigned short FlibHndl, short adr_type, ODBPMCINF *pmcif);
ARGUMENTS
| Name | Direction | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||
| adr_type | in |
Specify the kind of PMC address.
|
||||||||||||
| pmcif | out |
Pointer to the ODBPMCINF structure including the PMC data information.
typedef struct odbpmcinf {
short datano ; /* number of PMC data information */
struct {
char pmc_adr ; /* kind of PMC address */
char adr_attr ; /* attribute of PMC address */
unsigned short top_num ; /* top number of PMC address */
unsigned short last_num ;/* last number of PMC address */
} info[64] ;
} ODBPMCINF ;
|
ERRORS
| Code | Description |
|---|---|
| EW_ATTRIB |
Kind of data(adr_type) is wrong. |
| EW_NOOPT |
The extended driver/library function is necessary. |
pmc\pmc_rdpmcparam
In case of 31i/32i, the header information is as follows. The header information is as follows by the unit type of PMC.
When you execute this function, change to 'EDIT' mode.
The format of the read PMC parameter is shown as follows.
In case of SB5/SB6:
%;
N60xxx Pnnnnn;
Timer(T)
:
N61xxx Pnnnnn;
Counter(C)
:
N62xxx Pnnnnn;
Keep relay(K)
:
N63xxx Pnnnnn;
Data table control(D) of data
:
N64xxx Pnnnnn;
Data(D) of data
:
%;
In case of SB7:
%;
(PMC=SB7,MSID=0);
Header
N60xxx Pnnnnn;
Timer(T)
:
N61xxx Pnnnnn;
Counter(C)
:
N62xxx Pnnnnn;
Keep relay(K)
:
N63xxx Pnnnnn;
Data table control(D) of data
:
N64xxx Pnnnnn;
Data(D) of data
:
N69xxx Pnnnnn;
Extended memory(E)
:
%;
In case of PMC for 30i/31i/32i:
%;
(PMC=30I-A,MSID=1);
Header
N60xxxx Pnnnnn;
Timer(T)
:
N61xxxx Pnnnnn;
Counter(C)
:
N62xxxx Pnnnnn;
Keep relay(K)
:
N63xxxx Pnnnnn;
Data table control(D) of data
:
N64xxxx Pnnnnn;
Data(D) of data
:
N69xxxx Pnnnnn;
Extended memory(E)
:
%;
31i
:
(PMC=31I-A,MSID=1);
32i
:
(PMC=32I-A,MSID=1);
1st PMC
:
(PMC=30I-A,MSID=1);
2nd PMC
:
(PMC=30I-A,MSID=2);
3rd PMC
:
(PMC=30I-A,MSID=3);
Dual-check safety PMC
:
(PMC=30I-A,MSID=9);
* ";" shows EOB(=0x0a).
When the EOB data cannot be read by specified *length, data to immediately before is read.
Moreover, when also one block of the PMC parameter cannot be read, EW_LENGTH error occurs.
PROTOTYPE
FWLIBAPI short WINAPI pmc_rdpmcparam(unsigned short FlibHndl, long *length, char *buff);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. |
| length | in/out |
When the function is normal return (EW_OK), the function returns the length of the character which was actually read. |
| buff | out |
When the size of the area specified with this pointer is smaller than the size specified by *length, the operation of this function is not guaranteed. |
ERRORS
| Code | Description |
|---|---|
| EW_RESET |
All PMC parameter already was uploaded. |
| EW_FUNC |
|
| EW_LENGTH |
The value of 0 or less was specified for read size(*length). |
| EW_PATH |
The PMC unit type was changed. |
| EW_NOOPT |
|
| EW_MODE |
CNC mode is not EDIT mode. |
pmc\pmc_rdpmcrng
Reads the PMC data of the specified PMC address/range.
This function is used to exchange the data between the application on
MMC function and LADDER software on PMC.
PROTOTYPE
FWLIBAPI short WINAPI pmc_rdpmcrng(unsigned short FlibHndl, short adr_type, short data_type,
unsigned short s_number, unsigned short e_number, unsigned short length, IODBPMC *buf);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| adr_type | in |
Specify the identification code corresponding to the kind of the PMC address.
It is not possible to write to all areas of address 'F' and 'X', and "R9000",... Moreover, "K0017"..."K0019" and "K0900"..."K0909" must not be written.
It is not possible to write to all areas of address 'F' and 'X', and "R9000",... Moreover, "K0900"..."K0909" must not be written.
It is not possible to write to all areas of address 'F' and 'X', and "R9000",... Moreover, "K0017"..."K0019" and "K0900"... must not be written.
It is not possible to write to all areas of address 'F' and 'X', and "R9000",... Moreover, "K0017"..."K0019" must not be written.
It is not possible to write to all areas of address 'F' and 'X', and "R9000",... Moreover, "K0017"..."K0019" must not be written.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| data_type | in |
It must be the same one as the type of data of the PMC side.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| s_number | in |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| e_number | in |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| length | in |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| buf | out |
Pointer to the IODBPMC structure.
#if defined (PMCMEMD)
typedef struct iodbpmc {
short type_a ; /* Kind of PMC address */
short type_d ; /* Type of the PMC data */
unsigned short datano_s ; /* Start PMC address number */
unsigned short datano_e ; /* End PMC address number */
union {
char cdata[N] ;/* The PMC data(byte type) */
short idata[N] ;/* (word type) */
long ldata[N] ;/* (long type) */
float fdata[N] ; /* (32-bit floating-point type)*/
double dfdata[N]; /* (64-bit floating-point type)*/
} u ; /* N is the number of read data */
} IODBPMC ;
#else
typedef struct iodbpmc {
short type_a ; /* Kind of PMC address */
short type_d ; /* Type of the PMC data */
short datano_s ; /* Start PMC address number */
short datano_e ; /* End PMC address number */
union {
char cdata[N] ;/* The PMC data(byte type) */
short idata[N] ;/* (word type) */
long ldata[N] ;/* (long type) */
float fdata[N] ; /* (32-bit floating-point type)*/
double dfdata[N]; /* (64-bit floating-point type)*/
} u ; /* N is the number of read data */
} IODBPMC ;
#endif
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| adr_type | in |
Specify the identification code corresponding to the kind of the PMC address.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| data_type | in |
It must be the same one as the type of data of the PMC side.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| s_number | in |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| e_number | in |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| length | in |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| buf | out |
Pointer to the IODBPMC structure.
#if defined (PMCMEMD)
typedef struct iodbpmc {
short type_a ; /* Kind of PMC address */
short type_d ; /* Type of the PMC data */
unsigned short datano_s ; /* Start PMC address number */
unsigned short datano_e ; /* End PMC address number */
union {
char cdata[N] ;/* The PMC data(byte type) */
short idata[N] ;/* (word type) */
long ldata[N] ;/* (long type) */
} u ; /* N is the number of read data */
} IODBPMC ;
#else
typedef struct iodbpmc {
short type_a ; /* Kind of PMC address */
short type_d ; /* Type of the PMC data */
short datano_s ; /* Start PMC address number */
short datano_e ; /* End PMC address number */
union {
char cdata[N] ;/* The PMC data(byte type) */
short idata[N] ;/* (word type) */
long ldata[N] ;/* (long type) */
} u ; /* N is the number of read data */
} IODBPMC ;
#endif
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ERRORS
| Code | Description |
|---|---|
| EW_NOPMC |
|
| EW_LENGTH |
Size of IODBPMC structure(length) is wrong. |
| EW_RANGE |
PMC address number(s_number,e_number) is wrong. |
| EW_ATTRIB |
Kind of PMC address(adr_type) or type of PMC data (data_type) is wrong. |
| EW_PASSWD |
(Series 16i/18i/21i, 0i-A/B/C) |
pmc\pmc_rdpmctitle
When this function is executed while editing the title data with PMC,
the return value becomes EW_REJECT, so please retry.
This function is effective in PMC-SB7, 30i, 0i-D/F and PMi-A.
PROTOTYPE
FWLIBAPI short WINAPI pmc_rdpmctitle(unsigned short FlibHndl, ODBPMCTITLE *title);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. |
| title | out |
Pointer to the array of ODBPMCTITLE structure where returned data are stored.
typedef struct odbpmctitle {
char mtb[48]; /* MACHINE TOOL BUILDER NAME */
char machine[48]; /* MACHINE TOOL NAME */
char type[48]; /* NC & PMC TYPE NAME */
char prgno[8]; /* PMC PROGRAM NO. */
char prgvers[4]; /* EDITION NO. */
char prgdraw[48]; /* ROGRAM DRAWING NO. */
char date[32]; /* DATE OF PROGRAMIN */
char design[48]; /* PROGRAM DESIGNED BY */
char written[48]; /* ROM WRITTEN BY */
char remarks[48]; /* REMARKS */
} ODBPMCTITLE ;
|
ERRORS
| Code | Description |
|---|---|
| EW_NOPMC |
|
| EW_DATA |
|
| EW_REJECT |
Please retry. |
| EW_VERSION |
|
pmc\pmc_rdprmend
This function is executable other than EDIT mode.
However, when EW_MODE or EW_PATH occurred by
pmc_rdpmcparam,
the return value of this function becomes the same value, too.
PROTOTYPE
FWLIBAPI short WINAPI pmc_rdprmend(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
| EW_NOOPT |
|
| EW_MODE |
pmc_rdpmcparam was executed other than the EDIT mode. |
| EW_PATH |
The PMC unit type was changed. |
pmc\pmc_rdprmstart
To uploading of PMC parameter, this function,
pmc_rdpmcparam and
pmc_rdprmend is used.
The procedure of uploading the PMC parameter is shown as follows.
*
Upload the PMC parameter repeatedly until the return value of
pmc_rdpmcparam becomes excepting
EW_OK. When all data is uploaded, EW_RESET is returned as a return value.
*
Judge final result of the uploading of PMC parameter from the return
value of pmc_rdprmend
*
In case of 0i-F, 30i/31i/32i, please beforehand select the PMC unit type which becomes the object by pmc_select_pmc_unit.
When you execute this function, change the CNC mode to EDIT.
PROTOTYPE
FWLIBAPI short WINAPI pmc_rdprmstart(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. |
ERRORS
| Code | Description |
|---|---|
| EW_BUSY |
pmc_rdprmstart or pmc_wrprmstart function has been already executed. |
| EW_NOOPT |
|
pmc\pmc_select_pmc_unit
PROTOTYPE
FWLIBAPI short WINAPI pmc_select_pmc_unit ( unsigned short FlibHndl, long unittype );
ARGUMENTS
| Name | Direction | Description | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||
| unittype | in |
|
ERRORS
| Code | Description |
|---|---|
| EW_NOPMC |
|
pmc\pmc_set_timer_type
Writes the PMC timer type of the specified timer number.
PROTOTYPE
FWLIBAPI short WINAPI pmc_set_timer_type(unsigned short FlibHndl, unsigned short s_no, unsigned short e_no, short *type);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||
| s_no | in |
Specify the start PMC timer number(1-250). |
||||||||||||||||||||||||
| e_no | in |
Specify the end PMC timer number(1-250). |
||||||||||||||||||||||||
| type | in |
The timer type is as follows.
|
ERRORS
| Code | Description |
|---|---|
| EW_RANGE |
PMC timer number(s_no, e_no) is wrong. |
| EW_DATA |
In order to get more information for this err_no return value, execute pmc_getdtailerrfunction. The timer number in which includ an incorrect data will be set onto the err_dtno of ODBPMCERR. |
pmc\pmc_wrcntldata
Writes the control data to manage PMC data table (address D). This function is not available at PMC-NA. Refer to the programming manual of PMC(ladder language) concerning the details of input arguments.
PROTOTYPE
FWLIBAPI short WINAPI pmc_wrcntldata(unsigned short FlibHndl, short length, IODBPMCCNTL *pmccntl);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||
| length | in |
Specify the length of data block. IODBPMCCNTL
N is the number of group to be written. |
||||||||||||||||||||||||||||||
| pmccntl | in |
The IODBPMCCNTL structure is as follows.
typedef struct iodbpmccntl {
short datano_s ; /* start group number */
short dummy ; /* (not used) */
short datano_e ; /* end group number */
struct {
char tbl_prm ; /* table parameter */
char data_type ; /* data type */
unsigned short data_size ;
/* size of data in group */
unsigned short data_dsp ;
/* address of data in group */
short dummy ; /* (not used) */
} info[N] ; /* N : number of group to be written */
} IODBPMCCNTL ;
|
ERRORS
| Code | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_LENGTH |
Size of IODBPMCCNTL structure(length) is wrong. |
|||||||||||||||
| EW_NUMBER |
Group number(datano_s,datano_e) is wrong. |
|||||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute pmc_getdtailerrfunction. The following detail status will be set onto the member, err_no of ODBERR structure.
|
|||||||||||||||
| EW_NOOPT |
The extended driver/library function is necessary. |
pmc\pmc_wrcntlgrp
Writes the total number of groups of the control data to manage PMC data table(address D). This function is not available at PMC-NA.
PROTOTYPE
FWLIBAPI short WINAPI pmc_wrcntlgrp(unsigned short FlibHndl, short grp_no);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| grp_no | in |
|
ERRORS
| Code | Description |
|---|---|
| EW_DATA |
Group number(grp_no) is wrong. |
| EW_NOOPT |
The extended driver/library function is necessary. |
pmc\pmc_wrkpm
Writes the data to the extended backup memory of PMC specified by "offset", "length".
The data must be stored in "data" as the same format with PMC.
PROTOTYPE
FWLIBAPI short WINAPI pmc_wrkpm(unsigned short FlibHndl, unsigned long offset,char *data,unsigned short length);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. |
| offset | in |
The top of the extended backup memory is indicated by '0'. |
| data | in |
The array is as follows. char data[65535] ; |
| length | in |
|
ERRORS
| Code | Description |
|---|---|
| EW_NOPMC |
|
| EW_LENGTH |
Size of data(length) is wrong. |
| EW_RANGE |
Start address(offset) is wrong. |
| EW_NOOPT |
This function needs the extended backup memory option. |
pmc\pmc_wrkpm2
Writes the data to the extended backup memory of PMC specified by "offset", "length".
The data must be stored in "data" as the same format with PMC.
PROTOTYPE
FWLIBAPI short WINAPI pmc_wrkpm2(unsigned short FlibHndl, unsigned long offset,char *data,unsigned long length);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. |
| offset | in |
The top of the extended backup memory is indicated by '0'. |
| data | in |
The array is as follows. char data[65535] ; |
| length | in |
|
ERRORS
| Code | Description |
|---|---|
| EW_NOPMC |
|
| EW_LENGTH |
Size of data(length) is wrong. |
| EW_RANGE |
Start address(offset) is wrong. |
| EW_NOOPT |
This function needs the PMC C language nonvolatile memory expansion or PMC C language nonvolatile memory expansion(256K) option. |
pmc\pmc_wrmsg
Writes the data of 32 bytes transmitted to the PMC.
It is necessary to receive the data on the PMC side to write the data.
If the PMC side does not receive the data, it waits in the library.
The data must be stored in the data array.
The meaning of the data can be decided by the each application of the PMC and the MMC.
The outline of each processing is as follows.
Note)
When the MMC side processing is late, the completion status on the PMC side is <-10>.
See the "PROGRAMMING MANUAL" of PMC for details of the PMC side processing.
PROTOTYPE
FWLIBAPI short WINAPI pmc_wrmsg(unsigned short FlibHndl,short length, short *data);
ARGUMENTS
| Name | Direction | Description | ||
|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. |
||
| length | in |
Specify the data block length of the transmission data. |
||
| data | in |
Specify the pointer to the transmission data storage area.
|
ERRORS
| Code | Description |
|---|---|
| EW_NOPMC |
|
| EW_LENGTH |
Data length(length) is wrong. |
pmc\pmc_wrpmcparam
When you execute this function, set '1' for PWE of the CNC parameter and make the state of CNC an emergency stop.
Refer to the description of pmc_rdpmcparam for the format of PMC parameter.
When the last character of buffer is not "A" or "%", EW_DATA error occurs.
PROTOTYPE
FWLIBAPI short WINAPI pmc_wrpmcparam(unsigned short FlibHndl, long *length, char *buff);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. |
| length | in/out |
The function returns the length of the character which was written actually. |
| buff | in |
|
ERRORS
| Code | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_RESET |
All PMC parameter already was written. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_FUNC |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_LENGTH |
The value of 0 or less was specified for write size(*length). |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_DATA |
The writing format is wrong. In case of 0i-F,30i/31i/32i, in order to get more information for this err_no return value, execute pmc_getdtailerrfunction. The following detail status will be set onto the member, err_no of ODBERR structure.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_NOOPT |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_PARAM |
CNC parameter(PWE) is '0'. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_PATH |
The PMC unit type was changed. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_REJECT |
CNC is not in "Emergency" state. |
pmc\pmc_wrpmcrng
Writes the PMC data of the specified PMC address/range.
This function is used to exchange the data between the application on
MMC function and LADDER software on PMC.
PROTOTYPE
FWLIBAPI short WINAPI pmc_wrpmcrng(unsigned short FlibHndl, short length,IODBPMC *buf);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||
| length | in |
|
|||||||||||||||
| buf | in |
Pointer to the IODBPMC structure.
#if defined (PMCMEMD)
typedef struct iodbpmc {
short type_a ; /* Kind of PMC address */
short type_d ; /* Type of the PMC data */
unsigned short datano_s ; /* Start PMC address number */
unsigned short datano_e ; /* End PMC address number */
union {
char cdata[N] ;/* The PMC data(byte type) */
short idata[N] ;/* (word type) */
long ldata[N] ;/* (long type) */
float fdata[N] ; /* (32-bit floating-point type)*/
double dfdata[N]; /* (64-bit floating-point type)*/
} u ; /* N is the number of read data */
} IODBPMC ;
#else
typedef struct iodbpmc {
short type_a ; /* Kind of PMC address */
short type_d ; /* Type of the PMC data */
short datano_s ; /* Start PMC address number */
short datano_e ; /* End PMC address number */
union {
char cdata[N] ;/* The PMC data(byte type) */
short idata[N] ;/* (word type) */
long ldata[N] ;/* (long type) */
float fdata[N] ; /* (32-bit floating-point type)*/
double dfdata[N]; /* (64-bit floating-point type)*/
} u ; /* N is the number of written data */
} IODBPMC ;
#endif
|
ERRORS
| Code | Description |
|---|---|
| EW_NOPMC |
|
| EW_LENGTH |
Size of IODBPMC structure(length) is wrong. |
| EW_RANGE |
Address range error PMC address number(datano_s,datano_e) is wrong. |
| EW_ATTRIB |
Kind of PMC address(type_a) or type of PMC data (type_d) is wrong. |
| EW_PASSWD |
(Series 16i/18i/21i, 0i-A/B/C) |
pmc\pmc_wrprmend
Even if the PWE of CNC parameter is '0' or the state of CNC is not an
emergency stop, this function is executable.
However, when EW_DATA, EW_PARAM, EW_PATH and EW_REJECT occurred during writing,
the return value of this function becomes the same value.
PROTOTYPE
FWLIBAPI short WINAPI pmc_wrprmend(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
| EW_DATA |
The writing format is wrong. |
| EW_NOOPT |
|
| EW_PARAM |
CNC parameter(PWE) is '0'. |
| EW_PATH |
The PMC unit type was changed. |
| EW_REJECT |
CNC is not in "Emergency" state. |
pmc\pmc_wrprmstart
The procedure of downloading the PMC parameter is shown as follows.
To downloading of PMC parameter, this function,
pmc_wrpmcparam and
pmc_wrprmend is used.
*
Repeatedly download the PMC parameter until the return value of
pmc_wrpmcparam becomes excepting
EW_OK or writing data is lost.
*
Judge final result of the downloading of PMC parameter from the
return value of pmc_wrprmend.
*
In case of 0i-F, 30i/31i/32i, please beforehand select the PMC unit type which becomes the object by pmc_select_pmc_unit.
When you execute this function, set '1' for PWE of the CNC parameter
and make the state of CNC an emergency stop.
PROTOTYPE
FWLIBAPI short WINAPI pmc_wrprmstart(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. |
ERRORS
| Code | Description |
|---|---|
| EW_BUSY |
pmc_rdprmstart or pmc_wrprmstart function has been already executed. |
| EW_NOOPT |
|
| EW_PARAM |
CNC parameter(PWE) is '0'. |
| EW_REJECT |
CNC is not in "Emergency" state. |
position\cnc_absolute
Reads the absolute position data of axis specified with "axis". The absolute position is stored in "data[0]" of "ODBAXIS". All axes can be read at a time by specifying ALL_AXES for "axis". In that case, an absolute position of each axis is stored in the data array of ODBAXIS. The decimal point position of the absolute position can be acquired in the cnc_getfigure function. The relation to the read absolute position, amount of Tool Length Compensation and Cutter Radius Compensation, and amount of servo delay and acceleration/deceleration delay follows setting the CNC parameter of the following description. Amount of Tool Length Compensation and Cutter Radius Compensation, and amount of servo delay and acceleration/deceleration delay is always included in the read absolute position. Amounts of Wire diameter Compensation, amounts of servo delay and acceleration/deceleration delay is always included in the read absolute position. Amount of Tool Length Compensation and Cutter Radius Compensation is always included in the read absolute position. But, amount of servo delay and acceleration/deceleration delay is not included.
PROTOTYPE
FWLIBAPI short WINAPI cnc_absolute( unsigned short FlibHndl, short axis, short length, ODBAXIS *absolute );
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| axis | in |
Specify axis number to read.
|
||||||
| length | in |
Specify the length of the data block(size of ODBAXIS structure) ODBAXIS
n = Maximum controlled axes
n = Current controlled axes |
||||||
| absolute | out |
Pointer to the ODBAXIS structure including the absolute position data of the controlled axes. The ODBAXIS structure is as follows.
typedef struct odbaxis {
short dummy ; /* Not used. */
short type ; /* Axis number. */
long data[MAX_AXIS] ; /* Absolute position data of controlled axis. */
} ODBAXIS ; /* MAX_AXIS is the maximum controlled axes. */
|
||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| axis | in |
Specify axis number to read.
|
||||||
| length | in |
Specify the length of the data block(size of ODBAXIS structure) ODBAXIS
|
||||||
| absolute | out |
Pointer to the ODBAXIS structure including the absolute position data of the controlled axes. The ODBAXIS structure is as follows.
typedef struct odbaxis {
short dummy ; /* Not used. */
short type ; /* Axis number. */
long data[MAX_AXIS] ; /* Absolute position data of controlled axis. */
} ODBAXIS ; /* MAX_AXIS is the maximum controlled axes. */
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of ODBAXIS structure(length) is illegal. |
| EW_ATTRIB |
The specification of axis number (axis) is improper. |
position\cnc_absolute2
Differences between functions of cnc_absolute2 and functions of cnc_absolute are described. The interface of function is similar to cnc_absolute function. The cnc_absolute function reads an absolute actual position where the
amount of all the tool offset was added to the command value.
Therefore, the coodinates values called by cnc_absolute and absolute
position displayed on the position display on CNC screen might be
different by the setting of CNC parameter. The cnc_absolute2 function reads the same value as the absolute
position diaplayed on the position display on CNC screen.
(Note)
Only when CNC control software supports the cnc_absolute2
function at the special series and version, cnc_absolute2 reads
the same value as the absolute position diaplayed on the
position display on CNC screen.
If CNC control software does not support this function,
cnc_absolute2 reads the same value returned by cnc_absolute.
- Series 15/15i, 30i, 0i-D/F, PMi-A
Both cnc_absolute and cnc_absolute2 read the same value as the absolute position displayed on the position display of CNC screen.
PROTOTYPE
FWLIBAPI short WINAPI cnc_absolute2( unsigned short FlibHndl, short axis, short length, ODBAXIS *absolute );
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| axis | in |
Specify axis number to read.
|
||||||
| length | in |
Specify the length of the data block(size of ODBAXIS structure) ODBAXIS
n = Maximum controlled axes
n = Current controlled axes |
||||||
| absolute | out |
Pointer to the ODBAXIS structure including the absolute position data of the controlled axes. The ODBAXIS structure is as follows.
typedef struct odbaxis {
short dummy ; /* Not used. */
short type ; /* Axis number. */
long data[MAX_AXIS] ; /* Absolute position data of controlled axis. */
} ODBAXIS ; /* MAX_AXIS is the maximum controlled axes. */
|
||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| axis | in |
Specify axis number to read.
|
||||||
| length | in |
Specify the length of the data block(size of ODBAXIS structure) ODBAXIS
|
||||||
| absolute | out |
Pointer to the ODBAXIS structure including the absolute position data of the controlled axes. The ODBAXIS structure is as follows.
typedef struct odbaxis {
short dummy ; /* Not used. */
short type ; /* Axis number. */
long data[MAX_AXIS] ; /* Absolute position data of controlled axis. */
} ODBAXIS ; /* MAX_AXIS is the maximum controlled axes. */
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of ODBAXIS structure(length) is illegal. |
| EW_ATTRIB |
The specification of axis number (axis) is improper. |
position\cnc_accdecdly
Reads the acceleration/deceleration delay amount of axis specified with "axis". The acceleration/deceleration delay amount is stored in "data[0]" of "ODBAXIS". All axes can be read at a time by specifying ALL_AXES for "axis".
In that case, an acceleration/deceleration delay amount of each axis is
stored in the data array of ODBAXIS. The decimal point position of the acceleration/deceleration delay
amount can be acquired in the cnc_getfigure function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_accdecdly(unsigned short FlibHndl, short axis, short length, ODBAXIS *accdecdly);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| axis | in |
Specify axis number to read.
|
||||||
| length | in |
Specify the length of the data block(size of ODBAXIS structure) ODBAXIS
n = Maximum controlled axes
n = Current controlled axes |
||||||
| accdecdly | out |
Pointer to the ODBAXIS structure including the acceleration/deceleration delay amount of the controlled axes. The ODBAXIS structure is as follows.
typedef struct odbaxis {
short dummy ; /* Not used. */
short type ; /* Axis number. */
long data[MAX_AXIS] ; /* Acceleration/deceleration delay amount of controlled axis. */
} ODBAXIS ; /* MAX_AXIS is the maximum controlled axes. */
|
||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| axis | in |
Specify axis number to read.
|
||||||
| length | in |
Specify the length of the data block(size of ODBAXIS structure) ODBAXIS
|
||||||
| accdecdly | out |
Pointer to the ODBAXIS structure including the acceleration/deceleration delay amount of the controlled axes. The ODBAXIS structure is as follows.
typedef struct odbaxis {
short dummy ; /* Not used. */
short type ; /* Axis number. */
long data[MAX_AXIS] ; /* Acceleration/deceleration delay amount of controlled axis. */
} ODBAXIS ; /* MAX_AXIS is the maximum controlled axes. */
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of ODBAXIS structure(length) is illegal. |
| EW_ATTRIB |
The specification of axis number (axis) is improper. |
position\cnc_actf
Reads the actual feed rate of the controlled axes of CNC. The actual feed rate is stored in "data" of "ODBACT".
PROTOTYPE
FWLIBAPI short WINAPI cnc_actf(unsigned short FlibHndl, ODBACT *actualfeed);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| actualfeed | out |
Pointer to the ODBACT structure including the actual feed rate of the controlled axes. The ODBACT structure is as follows.
typedef struct odbact {
short dummy[2]; /* dummy */
long data; /* the actual feed rate(F) */
} ODBACT ;
|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| actualfeed | out |
Pointer to the ODBACT structure including the actual feed rate of the controlled axes. The ODBACT structure is as follows.
typedef struct odbact {
short dummy[2]; /* dummy */
long data; /* the actual feed rate(F) */
} ODBACT ;
|
ERRORS
| Code | Description |
|---|---|
| EW_PARAM(Only Series 15) |
7613#0=0 when CNC is turned on, or 7613#0=1, 7613#1=0, 7613#2=0 at present. Set 7613#0=1 and 7613#1=1. Note) No error occurs in case of 7613#0=1,
7613#1=0, 7613#2=1, but the data is invalid.
|
position\cnc_acts
Reads the actual rotational speed of the spindle connected to CNC.
The actual spindle speed is stored in "data" of "ODBACT".
PROTOTYPE
FWLIBAPI short WINAPI cnc_acts(unsigned short FlibHndl, ODBACT *actualfeed);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| actualfeed | out |
Pointer to the ODBACT structure including the actual spindle speed. The ODBACT structure is as follows.
typedef struct odbact {
short dummy[2]; /* Not used. */
long data; /* Actual spindle speed(S). */
} ODBACT ;
|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| actualfeed | out |
Pointer to the ODBACT structure including the actual spindle speed. The ODBACT structure is as follows.
typedef struct odbact {
short dummy[2]; /* Not used. */
long data; /* Actual spindle speed(S). */
} ODBACT ;
|
ERRORS
| Code | Description |
|---|---|
| EW_PARAM |
(Series 15) |
position\cnc_acts2
Reads the actual rotational speed of the spindle connected to CNC. All spindle can be read at a time by specifying ALL_SPINDLES for "sp_no". In that case, an actual spindle speed of each serial spindle is stored in the data array of ODBACT2.
cnc_acts can read only the actual spindle speed which is selected by CNC. This function can read all actual spindle speed at a time, or the actual spindle speed specified by "sp_no".
The actual spindle speed is stored in "data[0]" of "ODBACT2".
PROTOTYPE
FWLIBAPI short WINAPI cnc_acts2(unsigned short FlibHndl, short sp_no, ODBACT2 *actualspindle);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| sp_no | in |
Specify spindle number to read.
n is MAX_SPINDLES(maximum number of spindle).
|
||||||
| actualspindle | out |
Pointer to the ODBACT2 structure including the actual spindle speed of the serial spindle. The ODBACT2 structure is as follows.
typedef struct odbact2 {
short datano; /* Spindle number. */
short type; /* Not used. */
long data[MAX_SPINDLES]; /* Spindle data. */
} ODBACT2 ; /* MAX_SPINDLES is maximum number of spindle. */
|
||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| sp_no | in |
Specify spindle number to read.
MAX_SPINDLES is maximum number of spindle. It becomes 8 in Series 30i. |
||||||
| actualspindle | out |
Pointer to the ODBACT2 structure including the actual spindle speed of the serial spindle. The ODBACT2 structure is as follows.
typedef struct odbact2 {
short datano; /* Spindle number. */
short type; /* Not used. */
long data[MAX_SPINDLES]; /* Spindle data. */
} ODBACT2 ; /* MAX_SPINDLES is maximum number of spindle. */
|
ERRORS
| Code | Description |
|---|---|
| EW_NUMBER |
The specification of spindle number (sp_no) is illegal. |
position\cnc_canmovrlap
Cancel the manual overlapped motion value of axis specified with "axis". It is possible to cancel the manual overlapped motion value of all axes at a time by specifying ALL_AXES for "axis".
PROTOTYPE
FWLIBAPI short WINAPI cnc_canmovrlap(unsigned short FlibHndl, short axis);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| axis | in |
Specify axis number to cancel.
|
ERRORS
| Code | Description |
|---|---|
| EW_ATTRIB |
The specification of axis number (axis) is improper. |
| EW_NOOPT |
Size of ODBAXIS structure (length) is illegal. |
| EW_PARAM |
Set 7100#3=1.( Series 16/18/21, 16i/18i/21i, 0i, 30i, Power Mate i, PMi-A ) |
position\cnc_clr3dplsmov
Clears the handle interrupt pulse amount and the handle interrupt move amount. It is only the handle interrupt pulse amount to be able to specify the mode.
(The handle interrupt move amount is cleared always for all axes.)
PROTOTYPE
FWLIBAPI short WINAPI cnc_clr3dplsmov(unsigned short FlibHndl, short type);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||
| type | in |
Specify the special handle feed mode number to clear handle interrupt pulse amount.
|
ERRORS
| Code | Description |
|---|---|
| EW_DATA |
Special handle feed mode number(type) is wrong. |
| EW_NOOPT |
The 3-dimensional handle feed function and the extended driver/library function are necessary. Besides, either the manual handle feed function or the manual handle interrupt function is necessary. |
position\cnc_clr5axpls
Clears the pulse amount for the manual feed for 5-axis machining.
PROTOTYPE
FWLIBAPI short WINAPI cnc_clr5axpls(unsigned short FlibHndl, short type);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||
| type | in |
Specify the type of pulse amount to be cleared.
|
ERRORS
| Code | Description |
|---|---|
| EW_NUMBER |
|
| EW_NOOPT |
The extended driver/library function and the manual feed for 5-axis machining are necessary. |
position\cnc_distance
Reads the amount of distance to go of axis specified with "axis". The amount of distance to go is stored in "data[0]" of "ODBAXIS". All axes can be read at a time by specifying ALL_AXES for "axis".
In that case, an amount of distance to go of each axis is stored in the
data array of ODBAXIS. The decimal point position of the amount of distance to go can be
acquired in the cnc_getfigure function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_distance(unsigned short FlibHndl, short axis, short length, ODBAXIS *distance);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| axis | in |
Specify axis number to read.
|
||||||
| length | in |
Specify the length of the data block(size of ODBAXIS structure) ODBAXIS
n = Maximum controlled axes
n = Current controlled axes |
||||||
| distance | out |
Pointer to the ODBAXIS structure including the number of distance to go of the controlled axes. The ODBAXIS structure is as follows.
typedef struct odbaxis {
short dummy ; /* Not used. */
short type ; /* Axis number. */
long data[MAX_AXIS] ; /* number of distance to go of controlled axis. */
} ODBAXIS ; /* MAX_AXIS is the maximum controlled axes. */
|
||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| axis | in |
Specify axis number to read.
|
||||||
| length | in |
Specify the length of the data block(size of ODBAXIS structure) ODBAXIS
|
||||||
| distance | out |
Pointer to the ODBAXIS structure including the number of distance to go of the controlled axes. The ODBAXIS structure is as follows.
typedef struct odbaxis {
short dummy ; /* Not used. */
short type ; /* Axis number. */
long data[MAX_AXIS] ; /* number of distance to go of controlled axis. */
} ODBAXIS ; /* MAX_AXIS is the maximum controlled axes. */
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of ODBAXIS structure(length) is illegal. |
| EW_ATTRIB |
The specification of axis number (axis) is improper. |
position\cnc_exaxisname
Reads the name of controlled axis and spindle name from 1st by the
specified (*num), with supporting "extended axis name". After execution, "(*num)" will have the actual number of axes in case
that "(*num)" is specified with the number that is larger than the
current effective number of axes. In case that "(*num)" is specified
with the number that is smaller than the current effective number of
axes, this function reads only the number of data specified by
"(*num)".
PROTOTYPE
FWLIBAPI short WINAPI cnc_exaxisname(unsigned short FlibHndl, short type, short *num, char (*axname)[4]);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| type | in |
Specify the kind of axis name to be read.
|
||||||
| num | in/out |
Specify the pointer for the variable that stores the number of axes to be read. This function will return the actual read number of axes after the execution. |
||||||
| axname | out |
Specify the pointer for the array of char[4] type data. 4 byte area is required for each axis name. The acquired axis name is ASCII string and the string is NULL terminated. The array of this char[4] is required by specified (*num). |
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Number of axis(*num) is less or equal 0. |
| EW_ATTRIB |
Kind of data(type) is wrong. |
position\cnc_exaxisname2
Reads the name of controlled axis and spindle name from 1st by the
specified (*num), with supporting "extended axis name". After execution, "(*num)" will have the actual number of axes in case
that "(*num)" is specified with the number that is larger than the
current effective number of axes. In case that "(*num)" is specified
with the number that is smaller than the current effective number of
axes, this function reads only the number of data specified by
"(*num)". The acquisition method(absolute axis or relative axis) of name can specify by argument(absolute).
PROTOTYPE
FWLIBAPI short WINAPI cnc_exaxisname2(unsigned short FlibHndl, short type, short absolute, short *num, char (*axname)[4]);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| type | in |
Specify the kind of axis name to be read.
|
||||||
| absolute | in |
Specify whether to acquire by a relative axis or an absolute axis.
|
||||||
| num | in/out |
Specify the pointer for the variable that stores the number of axes to be read. This function will return the actual read number of axes after the execution. |
||||||
| axname | out |
Specify the pointer for the array of char[4] type data. 4 byte area is required for each axis name. The acquired axis name is ASCII string and the string is NULL terminated. The array of this char[4] is required by specified (*num). |
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Number of axis(*num) is less or equal 0. |
| EW_ATTRIB |
Kind of data(type) is wrong. |
position\cnc_machine
Reads the machine position data of axis specified with "axis". The machine position is stored in "data[0]" of "ODBAXIS". All axes can be read at a time by specifying ALL_AXES for "axis".
In that case, an machine position of each axis is stored in the data
array of ODBAXIS. The decimal point position of the machine position can be acquired in
the cnc_getfigure function. The relation to the read machine position, and
amount of servo delay and acceleration/deceleration delay follows
setting the CNC parameter of the following description. Amount of servo delay and acceleration/deceleration delay is always included in the read machine position. Amount of servo delay and acceleration/deceleration delay is not included in the read machine position.
PROTOTYPE
FWLIBAPI short WINAPI cnc_machine(unsigned short FlibHndl, short axis, short length, ODBAXIS *machine);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| axis | in |
Specify axis number to read.
|
||||||
| length | in |
Specify the length of the data block(size of ODBAXIS structure) ODBAXIS
n = Maximum controlled axes
n = Current controlled axes |
||||||
| machine | out |
Pointer to the ODBAXIS structure including the machine position data of the controlled axes. The ODBAXIS structure is as follows.
typedef struct odbaxis {
short dummy ; /* Not used. */
short type ; /* Axis number. */
long data[MAX_AXIS] ; /* Machine position data of controlled axis. */
} ODBAXIS ; /* MAX_AXIS is the maximum controlled axes. */
|
||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| axis | in |
Specify axis number to read.
|
||||||
| length | in |
Specify the length of the data block(size of ODBAXIS structure) ODBAXIS
|
||||||
| machine | out |
Pointer to the ODBAXIS structure including the machine position data of the controlled axes. The ODBAXIS structure is as follows.
typedef struct odbaxis {
short dummy ; /* Not used. */
short type ; /* Axis number. */
long data[MAX_AXIS] ; /* Machine position data of controlled axis. */
} ODBAXIS ; /* MAX_AXIS is the maximum controlled axes. */
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of ODBAXIS structure(length) is illegal. |
| EW_ATTRIB |
The specification of axis number (axis) is improper. |
position\cnc_prstwkcd
Presets the word coordinate selecting in CNC(absolute position). It is possible to make preset to all axes at a time by specifying
ALL_AXES for "type".
In that case, an preset data of each axis is specified by the data
array in IDBWRA.
Preset data is specified by "data[0]" in "IDBWRA".
PROTOTYPE
FWLIBAPI short WINAPI cnc_prstwkcd(unsigned short FlibHndl, short length, IDBWRA *prstwkcd);
ARGUMENTS
| Name | Direction | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||
| length | in |
Specify the length of the data block(size of IDBWRA structure) IDBWRA
n = Maximum controlled axes
n = Current controlled axes |
||||||||||||
| prstwkcd | out |
Pointer to the IDBWRA structure to be set work coordinate system of the controlled axes. The IDBWRA structure is as follows.
typedef struct idbwra {
short datano; /* Not used. */
short type; /* Axis number. */
long data[MAX_AXIS]; /* Preset data. */
} IDBWRA ; /* MAX_AXIS is the maximum controlled axes. */
|
||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||
| length | in |
Specify the length of the data block(size of IDBWRA structure) IDBWRA
n = Maximum controlled axes (The data for current controlled axes are valid.) |
||||||||||||
| prstwkcd | out |
Pointer to the IDBWRA structure to be set work coordinate system of the controlled axes. The IDBWRA structure is as follows.
typedef struct idbwra {
short datano; /* Not used. */
short type; /* Axis number. */
long data[MAX_AXIS]; /* Preset data. */
} IDBWRA ; /* MAX_AXIS is the maximum controlled axes. */
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of ODBWRA structure(length) is illegal. |
| EW_ATTRIB |
The specification of axis number (type) is improper. |
| EW_DATA |
The content of "data" is out of range which can be specified. In order to get more information for this err_no return value, execute cnc_getdtailerr function. The axis number(0 -) which error occurred will be set onto the member, err_dtno of ODBERR structure. |
| EW_NOOPT |
The work coordinate system preset function and the extended driver/library function are necessary. |
| EW_REJECT(Series 16i/18i-W) |
|
position\cnc_rd3dmovrlap
Reads the movement amount (generally for 5 axes, in case of parallel
axis, 5 + 5 = 10 axes) about 3-dimensional handle feed. The number of each axis and the movement amount are stored respectively in "axes" and "data" of "ODB3DHDL". The places of decimal points can be got by cnc_getfigure function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rd3dmovrlap(unsigned short FlibHndl, ODB3DHDL *hdlmove);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| hdlmove | out |
Pointer to the ODB3DHDL structure including the movement amount of each axis. The ODB3DHDL structure is as follows.
typedef struct odb3dhdl {
short axes[5] ; /* Axis number(0 -) */
long data[5] ; /* Movement amount */
} ODB3DHDL ;
ODB3DHDL hdlmove[2] ;
/* hdlmove[0] : for general and first parallel axis */
/* hdlmove[1] : for second parallel axis */
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The 3-dimensional handle feed function and the extended driver/library function are necessary. Besides, either the manual handle feed function or the manual handle interrupt function is necessary. |
position\cnc_rd3dofschg
Read the modification of tool length compensation amount in tool axis direction. The places of decimal points can be got by cnc_getfigure function specified tool offset.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rd3dofschg(unsigned short FlibHndl, long *ofschg);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| ofschg | out |
Specify the address of the array to store the modification of tool length compensation amount in tool axis direction. Actual modification of tool length compensation amount in tool axis direction being read is stored after this function call.
long ofschg[2] ;
/* ofschg[0] : for general and parallel axes */
/* ofschg[1] : (not used) */
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The 3-dimensional handle feed function and the extended driver/library function are necessary. Besides, either the manual handle feed function or the manual handle interrupt function is necessary. |
position\cnc_rd3dpulse
Reads the handle interrupt pulse amount about 3-dimensional handle feed. The handle interrupt pulse amount in special handle feed mode(G156#0,
#1,#2/DI) is stored in each member of "ODB3DPLS". The places of decimal points can be got by cnc_getfigure function specified tool offset.
Special handle feed mode
Interrupt pulse amount stored
Tool axis perpendicular direction mode X axis direction
right_angle_x
Tool axis perpendicular direction mode Y axis direction
right_angle_y
Tool axis direction mode
tool_axis
Tool tip center rotation mode A, B axis
tool_tip_a_b
Tool tip center rotation mode C axis
tool_tip_c
PROTOTYPE
FWLIBAPI short WINAPI cnc_rd3dpulse(unsigned short FlibHndl, ODB3DPLS *hdlpulse);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| hdlpulse | out |
Pointer to the ODB3DPLS structure including the handle interrupt pulse amount of each mode. The ODB3DPLS structure is as follows.
typedef struct odb3dpls {
long right_angle_x ; /* Tool axis perpendicular
direction mode X axis direction */
long right_angle_y ; /* Tool axis perpendicular
direction mode Y axis direction */
long tool_axis ; /* Tool axis direction mode */
long tool_tip_a_b ;
/* Tool tip center rotation mode A, B axis */
long tool_tip_c ;
/* Tool tip center rotation mode C axis */
} ODB3DPLS ;
ODB3DPLS hdlpulse[2] ;
/* hdlpulse[0] : for general and first parallel axis */
/* hdlpulse[1] : for second parallel axis */
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The 3-dimensional handle feed function and the extended driver/library function are necessary. Besides, either the manual handle feed function or the manual handle interrupt function is necessary. |
position\cnc_rd3dtooltip
Reads the absolute position of the tool tip coordinates about
3-dimensional handle feed. The places of decimal points can be got by cnc_getfigure function. The relation to the read tool tip coordinates, amount of
Tool Length Compensation and Cutter Radius Compensation, and amount of
servo delay and acceleration/deceleration delay follows setting the
CNC parameter of the following description.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rd3dtooltip(unsigned short FlibHndl, ODB3DHDL *tooltip);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| tooltip | out |
Pointer to the ODB3DHDL structure including the tool tip coordinates of the controlled axes. The ODB3DHDL structure is as follows.
typedef struct odb3dhdl {
short axes[5] ; /* Axis number(0 -) */
long data[5] ; /* Tool tip coordinates */
} ODB3DHDL ;
ODB3DHDL tooltip[2] ;
/* tooltip[0] : for general and first parallel axis */
/* tooltip[1] : for second parallel axis */
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The 3-dimensional handle feed function and the extended driver/library function are necessary. Besides, either the manual handle feed function or the manual handle interrupt function is necessary. |
position\cnc_rd5axmandt
Reads the data for the manual feed for 5-axis machining.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rd5axmandt(unsigned short FlibHndl, ODB5AXMAN *buf);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||
| buf | out |
Specify the pointer to the ODB5AXMAN structure to store the information of the tool tip coordinates of the manual feed for 5-axis machining.
typedef struct odb5axman {
short type1; /* axis number of 1st linear axis */
short type2; /* axis number of 2nd linear axis */
short type3; /* axis number of 3rd linear axis */
long data1; /* Tip position of 1st linear axis */
long data2; /* Tip position of 2nd linear axis */
long data3; /* Tip position of 3rd linear axis */
long c1; /* Tip center C1 */
long c2; /* Tip center C2 */
long dummy; /* unused */
long td; /* Tool axis TD */
long r1; /* Tool axis R1 */
long r2; /* Tool axis R2 */
long vr; /* Table VR */
long h1; /* Table H1 */
long h2; /* Table H2 */
} ODB5AXMAN ;
The unit of td, r1, r2, vr, h1, and h2 are different according to the value of parameter No.19697.
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The extended driver/library function and the manual feed for 5-axis machining are necessary. |
position\cnc_rd5axovrlap
Reads the machine axis movement for the manual feed of 5-axis machining. The axis number(axis) should be specified as 1..max controlled axes (for reading each axis), or -1 (for reading all axes once). The unit of machine axis is the same as absolute coordinate value.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rd5axovrlap(unsigned short FlibHndl, short axis, short length, ODBAXIS *buf);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| axis | in |
Specify axis number to read.
|
||||||
| length | in |
Specify the length of the data block(size of ODBAXIS structure) ODBAXIS
n = Maximum controlled axes |
||||||
| buf | out |
Specify the pointer to the ODBAXIS structure to store the machine axis movement of the manual feed for 5-axis machining.
typedef struct odbaxis {
short dummy ; /* Not used. */
short type ; /* Axis number. */
long data[MAX_AXIS] ; /* amount of machine axes movement */
} ODBAXIS ; /* MAX_AXIS is the maximum controlled axes. */
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of ODBAXIS structure(length) is illegal. |
| EW_ATTRIB |
The specification of axis number (axis) is improper. |
| EW_NOOPT |
The extended driver/library function and the manual feed for 5-axis machining are necessary. |
position\cnc_rdaxisdata
Reads various data relating servo axis/spindle axis that is got by cnc_rdposition, cnc_rdspeed, cnc_rdsvmeter, cnc_rdspmeter, cnc_rdhndintrpt, with supporting "extended axis name". You have to specify the argument "cls" with the data class to be read,
array of short, "type[]" with the kind of data to be read. The number
of the array must be specified by the argument "num".
The data kind that can be read once is up to 4. If "num" exceeds 4,
this function will return the error, EW_ATTRIB. The argument "(*len)" should be specified with the number of axes to be
read. According to "cls", "(*len)" should be specified as follows. 1. In case that "cls" is specified with Position(=1), Servo(=2), Spindle(=3): 2. In case that "cls" is specified with Selected spindle(=4), Speed(=5): The read data will be stored on the array of ODBAXDATA structure
specified by the argument "axdata[]". The number of members of this
array must be "num" x "(*len)". The read data will be stored on the
array, by the number of specified "(*len)" and order of specified
"type[]" like as follows: Even in case that specified "(*len)" is smaller than the actual number
of axes, the data will be stored on the array according to the "(*len)"
that was specified at calling of this function.
Example of arguments)
In case of reading Absolute position, Machine position, Relative
position: The contents of the array "axdata" will be as follows. If the current effective number of axes is 2, (*len) will be
returned 2 and array for 3rd axis(axdata[2], [5], [8]) will have
no data after the execution.
Data of type[0]
:
axdata[
0]
,..,axdata[
(*len)-1]
Data of type[1]
:
axdata[
(*len)]
,..,axdata[
2 x (*len)-1]
Data of type[2]
:
axdata[
2 x (*len)]
,..,axdata[
3 x (*len)-1]
Data of type[3]
:
axdata[
3 x (*len)]
,..,axdata[
4 x (*len)-1]
short types[3] = {0, 1, 2}; /* Absolute, Machine, Relative */
len = 3; /* Specify 3 axes */
ODBAXDT axdata[3*3];
cnc_rdaxisdata(h, 1, types, 3, &len, axdata);
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdaxisdata(unsigned short FlibHndl,
short cls, short* type, short num, short* len,
ODBAXDT* axdata);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cls | in |
Specify the class of data to be read.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type | in |
Specify the pointer for the array that specifies the kind of data to be read. The following value can be specified according to "cls".
cls = 2 (Servo)
cls = 3 (Spindle) and cls = 4 (Selected spindle)
cls = 5 (Speed)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| num | in |
Specify the number of array "type". |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| len | in/out |
Specify the pointer that stores the number of axes to be read. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| axdata | out |
Specify the pointer of the array of ODBAXDT structure. Number of "num" x "(*len)" must be required. The ODBAXDT structure is as follows.
typedef struct odbaxdt {
char name[4]; /* axis name */
long data; /* data */
short dec; /* decimal point */
short unit; /* unit of data */
short flag; /* flags */
short reserve; /* reserved */
} ODBAXDT ;
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Number of axis(*len) is less or equal 0. |
| EW_NUMBER |
Data class(cls) is wrong. |
| EW_ATTRIB |
Kind of data(type) is wrong, or The number of kind(num) exceeds 4. |
| EW_NOOPT |
Required option to read data is not specified. |
position\cnc_rdaxisname
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdaxisname(unsigned short FlibHndl, short *data_num, ODBAXISNAME *axisname);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| data_num | in/out |
Specify the pointer to the number of data to be read. This function returns the number of data which was read actually. |
| axisname | out |
Specify the pointer to the array of ODBAXISNAME structure to store the axis names. The number of array must be equal to "*data_num". The ODBAXISNAME structure is as follows.
typedef struct odbaxisname {
char name ; /* axis name */
char suff ; /* subscript of axis name */
} ODBAXISNAME ;
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
The axis number (*data_num) is 0 or less. |
position\cnc_rddynamic
Read various data which changes at CNC operation at a time. The data which can be read is as follows. The formats of each data are same as "Function used for reading individually". Refer to each function for details.
Data
Function used for reading individually
Alarm status
cnc_alarm
Program number in executing
cnc_rdprgnum
Program number of the main program
cnc_rdprgnum
Sequence number
cnc_rdseqnum
Actual feed rate
cnc_actf
Actual spindle speed
cnc_acts
Absolute position data of controlled axis (2)
cnc_absolute2
Machine position data of controlled axis
cnc_machine
Relative position data of controlled axis (2)
cnc_relative2
Amount of distance to go of controlled axis
cnc_distance
All axes can be read at a time by specifying ALL_AXES for "axis".
In that case, various data concerning the axis is stored in each array
of faxis inside of ODBDY.
The decimal point position of the various data concerning the axis
can be acquired in the cnc_getfigure function.
This function cannot read all alarm status.
Please use cnc_rddynamic2 function in order to read all alarm status.
it is
necessary to switch API to the one for the program number 8 digits.
See "Program number 8 digits" for details.
- it is possible to use this function for
the program number 8 digits, however it is necessary to switch API to
the one for the program number 8 digits. See "Program number 8 digits" for details.
- the data corresponding to "Actual spindle
speed", "Amount of distance to go of controlled axis" cannot be got.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rddynamic( unsigned short FlibHndl, short axis, short length, ODBDY *rddynamic );
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| axis | in |
Specify axis number to read.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| length | in |
Specify the length of the data block(size of ODBDY structure) ODBDY
n = Maximum controlled axes (The data for current controlled axes are valid) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rddynamic | out |
Pointer to the ODBDY structure including various data. The ODBDY structure is as follows.
For program number 4 digits
typedef struct odbdy {
short dummy ; /* not used */
short axis ; /* axis number */
short alarm ; /* alarm status */
short prgnum ; /* current program number */
short prgmnum ; /* main program number */
long seqnum ; /* current sequence number */
long actf ; /* actual feedrate */
long acts ; /* actual spindle speed */
union {
struct {
long absolute[MAX_AXIS] ; /* absolute */
long machine[MAX_AXIS] ; /* machine */
long relative[MAX_AXIS] ; /* relative */
long distance[MAX_AXIS] ; /* distance to go */
} faxis ; /* In case of all axes */
struct {
long absolute ; /* absolute */
long machine ; /* machine */
long relative ; /* relative */
long distance ; /* distance to go */
} oaxis ; /* In case of 1 axis */
} pos ;
} ODBDY ; /* MAX_AXIS is the maximum controlled axes. */
For program number 8 digits
typedef struct odbdy {
short dummy ; /* not used */
short axis ; /* axis number */
short alarm ; /* alarm status */
long prgnum ; /* current program number */
long prgmnum ; /* main program number */
long seqnum ; /* current sequence number */
long actf ; /* actual feedrate */
long acts ; /* actual spindle speed */
union {
struct {
long absolute[MAX_AXIS] ; /* absolute */
long machine[MAX_AXIS] ; /* machine */
long relative[MAX_AXIS] ; /* relative */
long distance[MAX_AXIS] ; /* distance to go */
} faxis ; /* In case of all axes */
struct {
long absolute ; /* absolute */
long machine ; /* machine */
long relative ; /* relative */
long distance ; /* distance to go */
} oaxis ; /* In case of 1 axis */
} pos ;
} ODBDY ; /* MAX_AXIS is the maximum controlled axes. */
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of ODBDY structure(length) is illegal. |
| EW_ATTRIB |
The specification of axis number (axis) is improper. |
position\cnc_rddynamic2
Reads various data which changes at CNC operation at a time.
This function is the improved version of the cnc_rddynamic function. Please use this function because the cnc_rddynamic function cannot read all alarm status of Series 15i. The data which can be read is as follows. The formats of each data are same as "Function used for reading
individually".
Refer to each function for details. The data concerning the axis is read by specified with axis. Each data is stored in oaxis structure in ODBDY2. All axes can be read at a time by specifying ALL_AXES for "axis".
In that case, various data concerning the axis is stored in each array
of faxis inside of ODBDY2. The decimal point position of the various data concerning the axis
can be acquired in the cnc_getfigure function.
Data
Function used for reading individually
Alarm status
cnc_alarm2
Program number in executing
cnc_rdprgnum
Program number of the main program
cnc_rdprgnum
Sequence number
cnc_rdseqnum
Actual feed rate
cnc_actf
Actual spindle speed
cnc_acts
Absolute position data of controlled axis (2)
cnc_absolute2
Machine position data of controlled axis
cnc_machine
Relative position data of controlled axis (2)
cnc_relative2
Amount of distance to go of controlled axis
cnc_distance
PROTOTYPE
FWLIBAPI short WINAPI cnc_rddynamic2( unsigned short FlibHndl, short axis, short length, ODBDY2 *rddynamic );
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| axis | in |
Specify axis number to read.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| length | in |
Specify the length of the data block(size of ODBDY2 structure) ODBDY2
n = Maximum controlled axes (The data for current controlled axes are valid.) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rddynamic | out |
Pointer to the ODBDY2 structure including various data. The ODBDY2 structure is as follows.
typedef struct odbdy2 {
short dummy ; /* not used */
short axis ; /* axis number */
long alarm ; /* alarm status */
long prgnum ; /* current program number */
long prgmnum ; /* main program number */
long seqnum ; /* current sequence number */
long actf ; /* actual feedrate */
long acts ; /* actual spindle speed */
union {
struct {
long absolute[MAX_AXIS] ; /* absolute */
long machine[MAX_AXIS] ; /* machine */
long relative[MAX_AXIS] ; /* relative */
long distance[MAX_AXIS] ; /* distance to go */
} faxis ; /* In case of all axes */
struct {
long absolute ; /* absolute */
long machine ; /* machine */
long relative ; /* relative */
long distance ; /* distance to go */
} oaxis ; /* In case of 1 axis */
} pos ;
} ODBDY2 ; /* MAX_AXIS is the maximum controlled axes. */
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of ODBDY structure(length) is illegal. |
| EW_ATTRIB |
The specification of axis number (axis) is improper. |
position\cnc_rdhndintrpt
Reads the handle interruption values from 1st axis to the specified axis number. In case that "data_num" is bigger than the current controlled axis number, this function sets the actual read axis number (the current controlled axis number) to "data_num" variable after execution. And in case that "data_num" is smaller than the current controlled axis number, this function reads data for the specified axis number which is specified by "data_num".
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdhndintrpt(unsigned short FlibHndl, short type, short *data_num, ODBHND *hnd);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||
| type | in |
Specify the data type.
|
|||||||||||||||
| data_num | in / out |
Specify the pointer to the number of data to be read. |
|||||||||||||||
| hnd | out |
Specify the pointer to the array of ODBHND structure to store the handle interruption values.
typedef struct odbhnd {
POSELM input; /* input unit */
POSELM output; /* output unit */
} ODBHND ;
And the POSELM structure is as follows.
typedef struct poselm {
long data; /* handle interruption value */
short dec; /* place of decimal point of handle interruption value */
short unit; /* unit of handle interruption value */
short disp; /* status of display */
char name; /* axis name */
char suff; /* subscript of axis name */
} POSELM;
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
The axis number (*data_num) is 0 or less. |
| EW_ATTRIB |
Type of handle interruption value (type) is wrong. |
| EW_NOOPT |
The handle interrupt function and the extended driver/library function are necessary. |
position\cnc_rdmovrlap
Read the manual overlapped motion value based on the input unit and based on the output unit. All axes can be read at a time by specifying ALL_AXES for "axis".
(It is impossible to read each axis)
In that case, an manual overlapped motion value of each axis is stored
in the data array of IODBOVL. The decimal point position of the manual overlapped motion value can
be acquired in the cnc_getfigure function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdmovrlap(unsigned short FlibHndl, short axis, short length, IODBOVL *movrlap);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| axis | in |
Specify axis number to read.
|
||||||
| length | in |
Specify the length of the data block(size of IODBOVL structure) IODBOVL
n = Maximum controlled axes |
||||||
| movrlap | out |
Pointer to the IODBOVL structure including the manual overlapped motion value of the controlled axes. The IODBOVL structure is as follows.
typedef struct iodbovl {
short datano; /* Not used. */
short type; /* Axis number. */
long data[2][MAX_AXIS]; /* Manual overlapped motion value. */
} IODBOVL ; /* MAX_AXIS is the maximum controlled axes. */
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of IODBOVL structure(length) is illegal. |
| EW_ATTRIB |
The specification of axis number (axis) is improper. |
| EW_NOOPT |
The handle interrupt function and the extended driver/library function are necessary. |
position\cnc_rdposition
Reads the positions from 1st axis to the specified axis number. In case that "*data_num" is bigger than the current controlled axis
number, this function sets the actual read axis number (the current
controlled axis number) to "*data_num" variable after execution.
And in case that "*data_num" is smaller than the current controlled
axis number, this function reads data for the specified axis number
which is specified by "*data_num".
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdposition(unsigned short FlibHndl, short type, short *data_num, ODBPOS *position);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||
| type | in |
Specify the data type.
|
|||||||||||||||
| data_num | in / out |
Specify the pointer to the number of data to be read. This function returns the number of data which was read actually. |
|||||||||||||||
| position | out |
Specify the pointer to the array of ODBPOS structure to store the positions. The number of array must be equal to "*data_num". The ODBPOS structure is as follows.
typedef struct odbpos {
POSELM abs; /* absolute position */
POSELM mach; /* machine position */
POSELM rel; /* relative position */
POSELM dist; /* distance to go */
} ODBPOS ;
And the POSELM structure is as follows.
typedef struct poselm {
long data; /* position data */
short dec; /* place of decimal point of position
data */
short unit; /* unit of position data */
short disp; /* status of display */
char name; /* axis name */
char suff; /* subscript of axis name */
} POSELM;
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
The axis number (*data_num) is 0 or less. |
| EW_ATTRIB |
Type of position (type) is wrong. |
position\cnc_rdspcss
Reads the following data related to constant surface speed control on CNC side.
Converted spindle speed value
Specified surface speed value
Clamp of maximum spindle speed value
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdspcss(unsigned short FlibHndl, ODBCSS *css);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| css | out |
Pointer to the ODBCSS structure including the constant surface speed control data. The ODBCSS structure is as follows.
typedef struct odbcss {
long srpm; /* Converted spindle speed value */
long sspm; /* Specified surface speed value */
long smax; /* Clamp of maximum spindle speed value */
} ODBCSS ;
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The constant surface speed control function and extended driver/library function is necessary. |
| EW_VERSION |
Replace the library or CNC control software. |
| EW_FUNC |
Replace the ethernet control software. |
position\cnc_rdspdlname
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdspdlname(unsigned short FlibHndl, short *data_num, ODBSPDLNAME *spdlname);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| data_num | in/out |
Specify the pointer to the number of data to be read. This function returns the number of data which was read actually. |
||||||
| spdlname | out |
Specify the pointer to the array of ODBSPDLNAME structure to store the spindle names. The number of array must be equal to "*data_num". The ODBSPDLNAME structure is as follows.
typedef struct odbspdlname {
char name; /* spindle name */
char suff1; /* subscript of spindle name 1 */
char suff2; /* subscript of spindle name 2 */
char suff3; /* reserved */
} ODBSPDLNAME ;
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
The spindle number (*data_num) is 0 or less. |
position\cnc_rdspdlspeed
This function does the calculation for serial spindle by which the gear
ratio was considered against the rotation speed of spindle motor.
And the approximate values of spindle speed(rpm) for numbers of spindle
which was specified by specified spindle or parameter are returned. * The error might be included because of the approximate value calculation. To calculate the spindle speed correctly by the above calculation
expression, it is necessary to set a correct value in the maximum
speed(rpm) of spindle motor and the maximum speed(rpm) to the gear as
follows. And the gear number under use must be notified to DI signal
correctly.
But, only the first spindle becomes effective when there is no option
of the multi spindle. In this function, the spindle speed is
calculated by the following calculation expression.
Spindle speed
=
Real speed(rpm)
Maximum speed(rpm)
*
Maximum speed to gear(rpm)
Maximum speed(rpm) of spindle motor
No spindle switching function, main spindle with spindle switching function
Parameter No.4020(S1)
Sub spindle with spindle switching function
Parameter No.4196(S1)
- The using gear number
| In case of gear selection mode M type of M system (The spindle is being controlled with CNC.) |
Distinguishes by DO signal F034#2,#1 and #0 which CNC outputs. |
| In case of gear selection mode M type of M system (The spindle is being controlled with PMC.) |
Specify by the argument(gear_no) of this function. |
| In case of gear selection mode T type of M system and T system |
The gear number is notified by DI signal G028#2 and #1. |
- The maximum speed(rpm) to gear
| In case of gear selection mode M type of M system (The spindle is being controlled with CNC.) |
F034#0=1 | Parameter No.3741 |
| F034#1=1 | Parameter No.3742 | |
| F034#2=1 | Parameter No.3743 | |
| In case of gear selection mode M type of M system (The spindle is being controlled with PMC.) |
gera_no=1 | Parameter No.3741 |
| gera_no=2 | Parameter No.3742 | |
| gera_no=3 | Parameter No.3743 | |
| In case of gear selection mode T type of M system and T system | G028#2=0, G028#1=0 | Parameter No.3741 |
| G028#2=0, G028#1=1 | Parameter No.3742 | |
| G028#2=1, G028#1=0 | Parameter No.3743 | |
| G028#2=1, G028#1=1 | Parameter No.3744 |
* The gear selection mode of M system is shown as follows.
| M type | without constant surface speed control option and Parameter No.3706#4=0 |
| T type | with constant surface speed control option or Parameter No.3706#4=1 |
- When there is an option of the multi spindle
- Maximum speed(rpm) of spindle motor
| No spindle switching function, main spindle with spindle switching function | 1st spindle | Parameter No.4020(S1) |
| 2nd spindle | Parameter No.4020(S2) | |
| 3rd spindle | Parameter No.4020(S3) | |
| 4tf spindle | Parameter No.4020(S4) | |
| Sub spindle with spindle switching function | 1st spindle | Parameter No.4196(S1) |
| 2nd spindle | Parameter No.4196(S2) | |
| 3rd spindle | Parameter No.4196(S3) | |
| 4th spindle | Parameter No.4196(S4) |
- The using gear number
| 1st spindle | The gear number is notified by DI signal G028#2 and #1. |
| 2nd spindle | The gear number is notified by DI signal G029#0. |
| 3rd spindle | The gear number is notified by DI signal G029#2. |
| 4th spindle | The gear number is notified by DI signal G031#4. |
- The maximum speed(rpm) to gear
| 1st spindle | G028#2=0,G028#1=0 | Parameter No.3741 |
| G028#2=0,G028#1=1 | Parameter No.3742 | |
| G028#2=1,G028#1=0 | Parameter No.3743 | |
| G028#2=1,G028#1=1 | Parameter No.3744 | |
| 2nd spindle | G029#0=0 | Parameter No.3811 |
| G029#0=1 | Parameter No.3812 | |
| 3rd spindle | G029#2=0 | Parameter No.3831 |
| G029#2=1 | Parameter No.3832 | |
| 4th spindle | G031#4=0 | Parameter No.3851 |
| G031#4=1 | Parameter No.3852 |
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdspdlspeed(unsigned short FlibHndl, short spdl_no, short gear_no, long *spdl_speed);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| spdl_no | in |
Specify the spindle number which wants to be acquired. |
| gear_no | in |
Specify the gear number used by PMC spindle output control.
2) Select the gear selection mode M type (Without constant surface speed control option, Parameter No.3706#4=0) 3) Signal G033#7 is 1. (The spindle is being controlled with PMC.) |
| spdl_speed | out |
Pointer to variable to store the spindle speed(rpm). |
ERRORS
| Code | Description |
|---|---|
| EW_NUMBER |
|
| EW_ATTRIB |
|
position\cnc_rdspeed
Reads the actual feed rate and the actual rotational speed of the spindle. The spindle speed, which can be read in this function, is one of the
main spindle that is dispalyed in the position screen of the CNC.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdspeed(unsigned short FlibHndl, short type, ODBSPEED *speed);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||
| type | in |
Specify the data type.
|
|||||||||||||||||||||
| speed | out |
Pointer to the ODBSPEED structure for the speed data. The ODBSPEED structure is as follows.
typedef struct odbspeed {
SPEEDELM actf; /* feed rate */
SPEEDELM acts; /* spindle speed */
} ODBSPEED ;
typedef struct speedelm {
long data; /* speed data */
short dec; /* place of decimal point*/
short unit; /* unit */
short reserve; /* */
char name; /* name */
char suff; /* subscript of name */
} SPEEDELM;
|
ERRORS
| Code | Description |
|---|---|
| EW_ATTRIB |
Type of data (type) is wrong. |
position\cnc_rdspgear
Reads the gear ratio of the serial spindle.
The gear ratio is stored in "data[0]" of "ODBSPN". All spindle can be read at a time by specifying ALL_SPINDLES for
"sp_no". In that case, an gear ratio of each serial spindle is stored
in the data array of ODBSPN.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdspgear(unsigned short FlibHndl, short sp_no, ODBSPN *serialspindle);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| sp_no | in |
Specify spindle number to read.
|
||||||
| serialspindle | out |
Pointer to the ODBSPN structure including the gear ratio of the serial spindle. The ODBSPN structure is as follows.
typedef struct odbspn {
short datano; /* Spindle number. */
short type; /* Not used. */
short data[MAX_SPINDLES]; /* Spindle data. */
} ODBSPN ; /* MAX_SPINDLES is maximum number of spindle. */
|
||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| sp_no | in |
Specify spindle number to read.
MAX_SPINDLES is maximum number of spindle. It becomes 8 in Series 30i. |
||||||
| serialspindle | out |
Pointer to the ODBSPN structure including the gear ratio of the serial spindle. The ODBSPN structure is as follows.
typedef struct odbspn {
short datano; /* Spindle number. */
short type; /* Not used. */
short data[MAX_SPINDLES]; /* Spindle data. */
} ODBSPN ; /* MAX_SPINDLES is maximum number of spindle. */
|
ERRORS
| Code | Description |
|---|---|
| EW_NUMBER |
The specification of spindle number (sp_no) is illegal. |
position\cnc_rdspload
Reads the load information of the serial spindle.
The load information of the serial spindle is stored in "data[0]" of "ODBSPN". All spindle can be read at a time by specifying ALL_SPINDLES for "sp_no".
In that case, an load information of each serial spindle is stored in
the data array of ODBSPN.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdspload(unsigned short FlibHndl, short sp_no, ODBSPN *serialspindle);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| sp_no | in |
Specify spindle number to read.
|
||||||
| serialspindle | out |
Pointer to the ODBSPN structure including the load information of the serial spindle. The ODBSPN structure is as follows.
typedef struct odbspn {
short datano; /* Spindle number. */
short type; /* Not used. */
short data[MAX_SPINDLE]; /* Spindle data. */
} ODBSPN ; /* MAX_SPINDLE is maximum number of spindle. */
|
||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| sp_no | in |
Specify spindle number to read.
MAX_SPINDLE is maximum number of spindle. It becomes 8 in Series 30i. |
||||||
| serialspindle | out |
Pointer to the ODBSPN structure including the load information of the serial spindle. The ODBSPN structure is as follows.
typedef struct odbspn {
short datano; /* Spindle number. */
short type; /* Not used. */
short data[MAX_SPINDLE]; /* Spindle data. */
} ODBSPN ; /* MAX_SPINDLE is maximum number of spindle. */
|
ERRORS
| Code | Description |
|---|---|
| EW_NUMBER |
The specification of spindle number (sp_no) is illegal. |
| EW_NOOPT |
The extended driver/library function is necessary. |
position\cnc_rdspmaxrpm
Reads the maximum r.p.m. ratio of serial spindle. The gear ratio is stored in "data[0]" of "ODBSPN". All spindle can be read at a time by specifying ALL_SPINDLES for
"sp_no". In that case, an maximum r.p.m. ratio of each serial spindle
is stored in the data array of ODBSPN.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdspmaxrpm(unsigned short FlibHndl, short sp_no, ODBSPN *serialspindle);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| sp_no | in |
Specify spindle number to read.
|
||||||
| serialspindle | out |
Pointer to the ODBSPN structure including the maximum r.p.m. ratio of the serial spindle. The ODBSPN structure is as follows.
typedef struct odbspn {
short datano; /* Spindle number. */
short type; /* Not used. */
short data[MAX_SPINDLES]; /* Spindle data. */
} ODBSPN ; /* MAX_SPINDLES is maximum number of spindle. */
|
||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| sp_no | in |
Specify spindle number to read.
MAX_SPINDLES is maximum number of spindle. It becomes 8 in Series 30i. |
||||||
| serialspindle | out |
Pointer to the ODBSPN structure including the maximum r.p.m. ratio of the serial spindle. The ODBSPN structure is as follows.
typedef struct odbspn {
short datano; /* Spindle number. */
short type; /* Not used. */
short data[MAX_SPINDLES]; /* Spindle data. */
} ODBSPN ; /* MAX_SPINDLES is maximum number of spindle. */
|
ERRORS
| Code | Description |
|---|---|
| EW_NUMBER |
The specification of spindle number (sp_no) is illegal. |
| EW_NOOPT |
The extended driver/library function is necessary. |
position\cnc_rdspmeter
Reads the spindle load meter data and the spindle motor speed data from
1st spindle to the specified spindle number. In case that "data_num" is bigger than the current spindle number, this function sets the actual read spindle number (the current spindle number) to "data_num" variable after execution. And in case that "data_num" is smaller than the current spindle number, this function reads data for the specified spindle number which is specified by "data_num".
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdspmeter(unsigned short FlibHndl, short type, short *data_num, ODBSPLOAD *loadmeter);
ARGUMENTS
| Name | Direction | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||
| type | in |
Specify the data type.
|
||||||||||||
| data_num | in / out |
Specify the pointer to the number of data to be read. This function returns the number of data which was read actually. |
||||||||||||
| loadmeter | out |
Specify the pointer to the array of ODBSVLOAD structure to store the spindle load meter data and the spindle motor speed data. The number of array must be equal to "*data_num". The ODBSVLOAD structure is as follows.
typedef struct odbspload {
LOADELM spload; /* spindle load meter data */
LOADELM spspeed; /* spindle motor data */
} ODBSPLOAD ;
The LOADELM structure is as follows.
typedef struct loadelm {
long data; /* load meter data, motor speed */
short dec; /* place of decimal point */
short unit; /* unit */
char name; /* spindle name */
char suff1; /* subscript of spindle name 1 */
char suff2; /* subscript of spindle name 2 */
char reserve; /* */
} LOADELM;
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
The spindle number (data_num) is 0 or less. |
| EW_ATTRIB |
Type of data (type) is wrong. |
position\cnc_rdsvmeter
Reads the servo load meter data from 1st axis to the specified axis number. In case that "*data_num" is bigger than the servo axis number, this function sets the actual read axis number (the servo axis number) to "*data_num" variable after execution. And in case that "*data_num" is smaller than the servo axis number, this function reads data for the specified axis number which is specified by "*data_num".
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdsvmeter(unsigned short FlibHndl, short *data_num, ODBSVLOAD *loadmeter);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| data_num | in / out |
Specify the pointer to the number of data to be read. This function returns the number of data which was read actually. |
| loadmeter | out |
Specify the pointer to the array of ODBSVLOAD structure to store the servo load meter data. The number of array must be equal to "*data_num". The ODBSVLOAD structure is as follows.
typedef struct odbsvload {
LOADELM svload; /* servo load meter data */
} ODBSVLOAD ;
And the LOADELM structure is as follows.
typedef struct loadelm {
long data; /* load meter data */
short dec; /* place of decimal point */
short unit; /* unit */
char name; /* axis name */
char suff1; /* subscript of axis name 1 */
char suff2; /* subscript of axis name 2 */
char reserve; /* */
} LOADELM;
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
The axis number (*data_num) is 0 or less. |
position\cnc_relative
Reads the relative position data of axis specified with "axis". The relative position is stored in "data[0]" of "ODBAXIS". All axes can be read at a time by specifying ALL_AXES for "axis".
In that case, an relative position of each axis is stored in the data
array of ODBAXIS. The decimal point position of the relative position can be acquired in
the cnc_getfigure function. Amount of Tool Length Compensation and Cutter Radius Compensation is always included in the read relative position. But, amount of servo delay and acceleration/deceleration delay is not included.
PROTOTYPE
FWLIBAPI short WINAPI cnc_relative(unsigned short FlibHndl, short axis, short length, ODBAXIS *relative);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| axis | in |
Specify axis number to read.
|
||||||
| length | in |
Specify the length of the data block(size of ODBAXIS structure) ODBAXIS
n = Maximum controlled axes
n = Current controlled axes |
||||||
| relative | out |
Pointer to the ODBAXIS structure including the relative position data of the controlled axes. The ODBAXIS structure is as follows.
typedef struct odbaxis {
short dummy ; /* Not used. */
short type ; /* Axis number. */
long data[MAX_AXIS] ; /* Relative position data of controlled axis. */
} ODBAXIS ; /* MAX_AXIS is the maximum controlled axes. */
|
||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| axis | in |
Specify axis number to read.
|
||||||
| length | in |
Specify the length of the data block(size of ODBAXIS structure) ODBAXIS
|
||||||
| relative | out |
Pointer to the ODBAXIS structure including the relative position data of the controlled axes. The ODBAXIS structure is as follows.
typedef struct odbaxis {
short dummy ; /* Not used. */
short type ; /* Axis number. */
long data[MAX_AXIS] ; /* Relative position data of controlled axis. */
} ODBAXIS ; /* MAX_AXIS is the maximum controlled axes. */
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of ODBAXIS structure(length) is illegal. |
| EW_ATTRIB |
The specification of axis number (axis) is improper. |
position\cnc_relative2
Differences between functions of cnc_relative2 and functions of cnc_relative are described. The interface of function is similar to cnc_relative function. The cnc_relative function reads an relative actual position where the amount of all the tool offset was added to the command value. Therefore, the coodinates values called by cnc_relative and relative position displayed on the position display on CNC screen might be different by the setting of CNC parameter. The cnc_relative2 function reads the same value as the relative position diaplayed on the position display on CNC screen.
(Note)
Only when CNC control software supports the cnc_relative2
function at the special series and version, cnc_relative2 reads
the same value as the relative position diaplayed on the
position display on CNC screen.
If CNC control software does not support this function,
cnc_relative2 reads the same value returned by cnc_relative.
- Series 15/15i, 30i, 0i-D/F, PMi-A
Both cnc_relative and cnc_relative2 read the same value as the relative position displayed on the position display of CNC screen.
PROTOTYPE
FWLIBAPI short WINAPI cnc_relative2(unsigned short FlibHndl, short axis, short length, ODBAXIS *relative);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| axis | in |
Specify axis number to read.
|
||||||
| length | in |
Specify the length of the data block(size of ODBAXIS structure) ODBAXIS
n = Maximum controlled axes
n = Current controlled axes |
||||||
| relative | out |
Pointer to the ODBAXIS structure including the relative position data of the controlled axes. The ODBAXIS structure is as follows.
typedef struct odbaxis {
short dummy ; /* Not used. */
short type ; /* Axis number. */
long data[MAX_AXIS] ; /* Relative position data of controlled axis. */
} ODBAXIS ; /* MAX_AXIS is the maximum controlled axes. */
|
||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| axis | in |
Specify axis number to read.
|
||||||
| length | in |
Specify the length of the data block(size of ODBAXIS structure) ODBAXIS
|
||||||
| relative | out |
Pointer to the ODBAXIS structure including the relative position data of the controlled axes. The ODBAXIS structure is as follows.
typedef struct odbaxis {
short dummy ; /* Not used. */
short type ; /* Axis number. */
long data[MAX_AXIS] ; /* Relative position data of controlled axis. */
} ODBAXIS ; /* MAX_AXIS is the maximum controlled axes. */
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of ODBAXIS structure(length) is illegal. |
| EW_ATTRIB |
The specification of axis number (axis) is improper. |
position\cnc_skip
Reads the skipped position of axis specified with "axis". The skipped position is stored in "data[0]" of "ODBAXIS". All axes can be read at a time by specifying ALL_AXES for "axis".
In that case, an skipped position of each axis is stored in the data
array of ODBAXIS. The decimal point position of the skipped position can be acquired in
the cnc_getfigure function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_skip(unsigned short FlibHndl, short axis, short length, ODBAXIS *skip);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| axis | in |
Specify axis number to read.
|
||||||
| length | in |
Specify the length of the data block(size of ODBAXIS structure) ODBAXIS
n = Maximum controlled axes
n = Current controlled axes |
||||||
| skip | out |
Pointer to the ODBAXIS structure including the skipped position data of the controlled axes. The ODBAXIS structure is as follows.
typedef struct odbaxis {
short dummy ; /* Not used. */
short type ; /* Axis number. */
long data[MAX_AXIS] ; /* Skipped position data of controlled axis. */
} ODBAXIS ; /* MAX_AXIS is the maximum controlled axes. */
|
||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| axis | in |
Specify axis number to read.
|
||||||
| length | in |
Specify the length of the data block(size of ODBAXIS structure) ODBAXIS
|
||||||
| skip | out |
Pointer to the ODBAXIS structure including the skipped position data of the controlled axes. The ODBAXIS structure is as follows.
typedef struct odbaxis {
short dummy ; /* Not used. */
short type ; /* Axis number. */
long data[MAX_AXIS] ; /* Skipped position data of controlled axis. */
} ODBAXIS ; /* MAX_AXIS is the maximum controlled axes. */
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of ODBAXIS structure(length) is illegal. |
| EW_ATTRIB |
The specification of axis number (axis) is improper. |
| EW_NOOPT(only Series 15/15i) |
The skip function is necessary. |
position\cnc_srvdelay
Reads the servo delay amount of axis specified with "axis". The servo delay amount is stored in "data[0]" of "ODBAXIS". All axes can be read at a time by specifying ALL_AXES for "axis".
In that case, an servo delay amount of each axis is stored in the data
array of ODBAXIS. The decimal point position of the servo delay amount can be acquired in
the cnc_getfigure function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_srvdelay(unsigned short FlibHndl, short axis, short length, ODBAXIS *srvdelay);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| axis | in |
Specify axis number to read.
|
||||||
| length | in |
Specify the length of the data block(size of ODBAXIS structure) ODBAXIS
n = Maximum controlled axes
n = Current controlled axes |
||||||
| srvdelay | out |
Pointer to the ODBAXIS structure including the servo delay amount of controlled axis. The ODBAXIS structure is as follows.
typedef struct odbaxis {
short dummy ; /* Not used. */
short type ; /* Axis number. */
long data[MAX_AXIS] ; /* Servo delay amount of controlled axis. */
} ODBAXIS ; /* MAX_AXIS is the maximum controlled axes. */
|
||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| axis | in |
Specify axis number to read.
|
||||||
| length | in |
Specify the length of the data block(size of ODBAXIS structure) ODBAXIS
|
||||||
| srvdelay | out |
Pointer to the ODBAXIS structure including the servo delay amount of controlled axis. The ODBAXIS structure is as follows.
typedef struct odbaxis {
short dummy ; /* Not used. */
short type ; /* Axis number. */
long data[MAX_AXIS] ; /* Servo delay amount of controlled axis. */
} ODBAXIS ; /* MAX_AXIS is the maximum controlled axes. */
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of ODBAXIS structure(length) is illegal. |
| EW_ATTRIB |
The specification of axis number (axis) is improper. |
position\cnc_wrrelpos
Sets again relative position against the axis specified with "type".
Preset data is specified by "data[0]" in "IDBWRR". If 0 is specified as preset data, it means origin(0 clear of relative
position). It is possible to make preset to all axes at a time by specifying
ALL_AXES for "type".
In that case, an preset data of each axis is specified by the data
array in IDBWRR.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrrelpos(unsigned short FlibHndl, short length, IDBWRR *wrrelpos);
ARGUMENTS
| Name | Direction | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||
| length | in |
Specify the length of the data block(size of IDBWRR structure) IDBWRR
n = Maximum controlled axes
n = Current controlled axes |
||||||||||||
| wrrelpos | out |
Pointer to the IDBWRR structure to be preset the relative position data of the controlled axes. The IDBWRR structure is as follows.
typedef struct idbwrr {
short datano; /* Not used. */
short type; /* Axis number. */
long data[MAX_AXIS]; /* Preset data. */
} IDBWRR ; /* MAX_AXIS is the maximum controlled axes. */
|
||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||
| length | in |
Specify the length of the data block(size of IDBWRR structure) IDBWRR
n = Maximum controlled axes (The data for current controlled axes are valid.) |
||||||||||||
| wrrelpos | out |
Pointer to the IDBWRR structure to be preset the relative position data of the controlled axes. The IDBWRR structure is as follows.
typedef struct idbwrr {
short datano; /* Not used. */
short type; /* Axis number. */
long data[MAX_AXIS]; /* Preset data. */
} IDBWRR ; /* MAX_AXIS is the maximum controlled axes. */
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of ODBWRR structure(length) is illegal. |
| EW_ATTRIB |
The specification of axis number (type) is improper. |
| EW_DATA |
The content of "data" is out of range which can be specified. In order to get more information for this err_no return value, execute cnc_getdtailerr function. The axis number(0 -) at which error occurred will be set onto the member, err_dtno of ODBERR structure. |
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_REJECT |
|
profibus\pbm_chg_mode
Changes the operation mode
PROTOTYPE
FWLIBAPI short WINAPI pbm_chg_mode( unsigned short FlibHndl, unsigned char chg_mode, OUT_CHGMODERESULT *chg_mode_result );
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||
| chg_mode | in |
operation mode
|
||||||||||||||||||||||||
| chg_mode_result | out |
Specifies the pointer to the OUT_CHGMODERESULT structure to store the acquired parameter.
typedef struct _OUT_CHGMODERESULT{
unsigned char crnt_mode;
unsigned char pad;
unsigned short result;
} OUT_CHGMODERESULT;
|
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
|||||||||
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
|||||||||
| EW_REJECT |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
profibus\pbm_exe_subfunc
Executes sub-function for setting
PROTOTYPE
FWLIBAPI short WINAPI pbm_exe_subfunc( unsigned short FlibHndl, short type, T_SLVSLT_IND *slvslt_ind );
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||
| type | in |
kind of sub-function
(note) about usage of slvslt_ind
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| slvslt_ind | in |
Specifies the pointer to the T_SLVSLT_IND structure.
typedef struct _T_SLVSLT_IND{
unsigned char slv_no;
unsigned char slt_no;
} T_SLVSLT_IND;
|
ERRORS
| Code | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
|||||||||||||||
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
profibus\pbm_ini_prm
Initiaze the specified parameter of the PROFIBUS master function.
PROTOTYPE
FWLIBAPI short WINAPI pbm_ini_prm( unsigned short FlibHndl, short type, T_SLVSLT_IND *slvslt_ind );
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type | in |
Specifies the kind of parameter to initiate.
(note) about usage of slvslt_ind
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| slvslt_ind | in |
Specifies the pointer to the T_SLVSLT_IND structure.
typedef struct _T_SLVSLT_IND{
unsigned char slv_no;
unsigned char slt_no;
} T_SLVSLT_IND;
|
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
|||||||||
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
|||||||||
| EW_PROT |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
|||||||||
| EW_REJECT |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
profibus\pbm_rd_allslvtbl
Reads all slave table
PROTOTYPE
FWLIBAPI short WINAPI pbm_rd_allslvtbl( unsigned short FlibHndl, OUT_ALLSLVTBL *all_slv_tbl );
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| all_slv_tbl | out |
Specifies the pointer to the OUT_ALLSLVTBL structure to store the acquired parameter.
typedef struct _OUT_ALLSLVTBL{
T_SLVTBL slv_tbl[80];
} OUT_ALLSLVTBL;
typedef struct _T_SLVTBL{
T_SLAVE_IND_PARA slv_ind_para;
unsigned char slv_enable;
unsigned char slt_num;
unsigned char dgn_path;
unsigned char dgn_kind;
unsigned short dgn_top_address;
unsigned char dgn_size;
unsigned char pad;
} T_SLVTBL;
/* SLAVE INDICATION PARAMETER */
typedef struct _T_SLAVE_IND_PARA
{
unsigned char slv_idx;
unsigned char slv_no;
} T_SLAVE_IND_PARA;
|
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
|||||||||
| EW_REJECT |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
profibus\pbm_rd_cominfo
Reads the communicating information
PROTOTYPE
FWLIBAPI short WINAPI pbm_rd_cominfo( unsigned short FlibHndl, short type, OUT_PBMCOMINFO *com_info );
ARGUMENTS
| Name | Direction | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||
| type | in |
the kind of the reading information
|
||||||||||||
| com_info | out |
Specifies the pointer to the OUT_PBMCOMINFO structure to store the acquired parameter.
typedef struct _OUT_PBMCOMINFO{
union {
unsigned char crnt_mode;
T_DATA_REF_TIM data_ref_tim;
} cominfo;
} OUT_PBMCOMINFO;
typedef struct _T_DATA_REF_TIM{
unsigned short total_ref_tim;
unsigned short board_ref_tim;
unsigned short cnc_ref_tim;
} T_DATA_REF_TIM;
|
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
|||||||||
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
|||||||||
| EW_REJECT |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
profibus\pbm_rd_errcode
Reads an error code
PROTOTYPE
FWLIBAPI short WINAPI pbm_rd_errcode( unsigned short FlibHndl, T_ERR_CODE *err_code );
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||
| err_code | out |
Specifies the pointer to the T_ERR_CODE structure to store the acquired parameter.
typedef struct _T_ERR_CODE{
unsigned short param_err_code[4];
unsigned short inter_err_code[4];
} T_ERR_CODE;
|
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
|||||||||
| EW_REJECT |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
profibus\pbm_rd_nodeinfo
Reads the information of slave station
PROTOTYPE
FWLIBAPI short WINAPI pbm_rd_nodeinfo( unsigned short FlibHndl, short node, short number, OUT_PBMNODEINFO *node_info );
ARGUMENTS
| Name | Direction | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||
| node | in |
The first slave number to want to get information |
||||||||||||
| number | in |
Number of slaves in which you want to get information |
||||||||||||
| node_info | out |
Specifies the pointer to the OUT_PBMNODEINFO structure to store the slave information.
typedef struct _OUT_PBMNODEINFO{
unsigned char slv_no;
unsigned char commstat;
unsigned char status1;
unsigned char status2;
unsigned char status3;
unsigned char master;
unsigned short ident;
} OUT_PBMNODEINFO;
|
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
|||||||||
| EW_REJECT |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
profibus\pbm_rd_nodetable
Reads status of connected slave
PROTOTYPE
FWLIBAPI short WINAPI pbm_rd_nodetable( unsigned short FlibHndl, short node, char *table );
ARGUMENTS
| Name | Direction | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||
| node | in |
slave number in which it wants to get state |
||||||||||||
| table | out |
Specifies the pointer of a valiable to store the acquired data.
|
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
|||||||||
| EW_REJECT |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
profibus\pbm_rd_param
Reads the parameters of the PROFIBUS master function.
PROTOTYPE
FWLIBAPI short WINAPI pbm_rd_param( unsigned short FlibHndl, short type, T_SLVSLT_IND *slvslt_ind, OUT_PBMPRM *param );
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type | in |
Specifies the kind of PROFIBUS master parameter.
/* parameter for each slave station */
/* parameter for each slot module */
(note) about using slvslt_ind
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| slvslt_ind | in |
Specifies the pointer to the T_SLVSLT_IND structure.
typedef struct _T_SLVSLT_IND{
unsigned char slv_no;
unsigned char slt_no;
} T_SLVSLT_IND;
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| param | out |
Specifies the pointer to the OUT_PBMPRM structure to store the acquired parameter. The OUT_PBMPRM structure is as follows.
/*- parameter of master function -----------------------------------*/
typedef struct _OUT_PBMPRM{
union {
T_BUS_PARA bus_para;
T_MODE_ADDR_ALLOC mode_addr_alloc;
T_SLAVE_SUB_PARA slv_sub_para;
T_SLAVE_PARA slv_para;
T_DGN_ADDR_ALLOC dgn_addr_alloc;
T_MODULE_DATA module_data;
T_DIDO_ADDR_ALLOC dido_addr_alloc;
} prm;
} OUT_PBMPRM;
/*- BUS PARAMETER -----------------------------------------*/
typedef struct _T_BUS_PARA
{
unsigned char fdl_add; /* station no. */
unsigned char baud_rate;
unsigned short tsl;
unsigned short min_tsdr;
unsigned short max_tsdr;
unsigned char tqui;
unsigned char tset;
unsigned long ttr;
unsigned char g;
unsigned char hsa;
unsigned char max_retry_limit;
unsigned char bp_flag;
unsigned short min_slave_interval;
unsigned short poll_timeout;
unsigned short data_control_time;
unsigned char reserved[6];
char master_class2_name[32];
T_MAS_USR mas_usr;
} T_BUS_PARA;
/* MASTER USER DATA */
typedef struct _T_MAS_USR
{
unsigned short master_user_data_len;
unsigned char master_user_data[62];
} T_MAS_USR;
/*- ADDRESS ALLOCATION FOR MODE -----------------------------------*/
typedef struct _T_MODE_ADDR_ALLOC
{
unsigned char md_path;
unsigned char md_kind;
unsigned short md_top_address;
unsigned char md_size;
unsigned char pad;
} T_MODE_ADDR_ALLOC;
/*- SLAVE SUB-PARAMETER -----------------------------------*/
typedef struct _T_SLAVE_SUB_PARA
{
T_SLAVE_IND_PARA slv_ind_para;
unsigned char slv_enable;
unsigned char slt_num;
} T_SLAVE_SUB_PARA;
/*- SLAVE PARAMETER -------------------------------------*/
typedef struct _T_SLAVE_PARA
{
T_SLAVE_IND_PARA slv_ind_para;
unsigned char sl_flag;
unsigned char slave_type;
unsigned char reserved[12];
T_PRM_DATA prm_data;
T_CFG_DATA cfg_data;
T_SLV_USR_DATA slv_usr;
} T_SLAVE_PARA;
/* PARAMETER DATA */
typedef struct _T_PRM_DATA
{
unsigned char station_status;
unsigned char wd_fact_1;
unsigned char wd_fact_2;
unsigned char min_tsdr;
unsigned short ident_number;
unsigned char group_ident;
unsigned char pad;
T_USR_PRM_DATA usr_prm;
} T_PRM_DATA;
/* USER PARAMETER DATA */
typedef struct _T_USR_PRM_DATA
{
unsigned short user_prm_data_len;
unsigned char user_prm_data[201];
unsigned char pad;
} T_USR_PRM_DATA;
/* CONFIGURATION DATA */
typedef struct _T_CFG_DATA
{
unsigned short cfg_data_len;
unsigned char cfg_data[128];
} T_CFG_DATA;
/* SLAVE USER DATA */
typedef struct _T_SLV_USR_DATA
{
unsigned short slave_user_data_len;
unsigned char slave_user_data[30];
} T_SLV_USR_DATA;
/*- ALLOCATION OF DIAGNOSIS DATA ---------------------------------------*/
typedef struct _T_DGN_ADDR_ALLOC
{
T_SLAVE_IND_PARA slv_ind_para;
unsigned char dgn_path;
unsigned char dgn_kind;
unsigned short dgn_top_address;
unsigned char dgn_size;
unsigned char pad;
} T_DGN_ADDR_ALLOC;
/*- MODULE DATA ---------------------------------------*/
typedef struct _T_MODULE_DATA
{
T_SLOT_IND_PARA slt_ind_para;
unsigned short module_len;
unsigned char module_data[128];
} T_MODULE_DATA;
/*- ALLOCATION OF DI/DO DATA --------------------------------------*/
typedef struct _T_DIDO_ADDR_ALLOC
{
T_SLOT_IND_PARA slt_ind_para;
unsigned char di_path;
unsigned char do_path;
unsigned char di_kind;
unsigned char do_kind;
unsigned short di_top_address;
unsigned short do_top_address;
unsigned char di_size;
unsigned char do_size;
unsigned char module_type;
unsigned char pad;
} T_DIDO_ADDR_ALLOC;
/* SLAVE INDICATION PARAMETER */
typedef struct _T_SLAVE_IND_PARA
{
unsigned char slv_idx;
unsigned char slv_no;
} T_SLAVE_IND_PARA;
/* SLOT INDICATION PARAMETER */
typedef struct _T_SLOT_IND_PARA
{
unsigned char slv_no;
unsigned char slt_no;
} T_SLOT_IND_PARA;
/*- BUS PARAMETER -----------------------------------------*/ /* MASTER USER DATA */ /*- ADDRESS ALLOCATION FOR MODE -----------------------------------*/ /*- SLAVE SUB-PARAMETER -----------------------------------*/ /*- SLAVE PARAMETER -------------------------------------*/ /* PARAMETER DATA */ /* USER PARAMETER DATA */ /* CONFIGURATION DATA */ /* SLAVE USER DATA */ /*- ALLOCATION OF DIAGNOSIS DATA ---------------------------------------*/ /*- MODULE DATA ---------------------------------------*/ /*- ALLOCATION OF DI/DO DATA --------------------------------------*/ |
ERRORS
| Code | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
|||||||||||||||
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
|||||||||||||||
| EW_REJECT |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
profibus\pbm_rd_slot
Reads the number of slot to which the DI/DO address of the master function is allocated regardless of Enable/Disable.
Number of slot that can be read in this function keeps the value when the power is turned on.
That is, it doesn't influence the return value of this function even if there is a change in slot information on the parameter setting screen.
PROTOTYPE
FWLIBAPI short WINAPI pbm_rd_slot( unsigned short FlibHndl, short *slot );
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| slot | out |
Specifies the pointer of valiable to store the read information. |
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
|||||||||
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
|||||||||
| EW_REJECT |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
profibus\pbm_rd_slotinfo
Reads the slot information to which the DI/DO address of the master function is allocated regardless of Enable/Disable.
Slot information that can be read in this function keeps the value when the power is turned on.
That is, it doesn't influence the return value of this function even if there is a change in slot information on the parameter setting screen.
PROTOTYPE
FWLIBAPI short WINAPI pbm_rd_slotinfo( unsigned short FlibHndl, short slot, short number, OUT_PBMSLOTINFO *slot_info );
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||
| slot | in |
The first slot array number that you want to get information |
||||||||||||||||||||||||||||||||||||
| number | in |
Number of slots that you want to get information |
||||||||||||||||||||||||||||||||||||
| slot_info | out |
Specifies the pointer to the OUT_PBMSLOTINFO structure to store the DI/DO information.
typedef struct _OUT_PBMSLOTINFO{
unsigned char slv_no;
unsigned char slt_no;
unsigned char di_size;
unsigned char do_size;
unsigned char di_path;
unsigned char do_path;
unsigned char di_kind;
unsigned char do_kind;
unsigned short di_top_address;
unsigned short do_top_address;
unsigned char module_type;
unsigned char commstat;
unsigned short reserved;
} OUT_PBMSLOTINFO;
|
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
|||||||||
| EW_REJECT |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
profibus\pbm_rd_subprm
Reads the setting assistant parameters
PROTOTYPE
FWLIBAPI short WINAPI pbm_rd_subprm( unsigned short FlibHndl, short type, T_SLVSLT_IND *slvslt_ind, OUT_PBMSUBPRM *sub_prm);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||
| type | in |
Specifies the kind of the setting assistant parameter.
(note) about usage of slvslt_ind
|
||||||||||||||||||||||||||||||||||
| slvslt_ind | in |
Specifies the pointer to the T_SLVSLT_IND structure.
typedef struct _T_SLVSLT_IND{
unsigned char slv_no;
unsigned char slt_no;
} T_SLVSLT_IND;
|
||||||||||||||||||||||||||||||||||
| sub_prm | out |
Specifies the pointer to the OUT_PBMSUBPRM structure to store the acquired parameter.
typedef struct _OUT_PBMSUBPRM{
union {
unsigned char max_slv_num;
unsigned char max_slt_num;
unsigned char enb_slv_num;
unsigned char total_slts;
unsigned char shift_mode_stat;
T_MAXMODLENPRM max_mod_len_prm;
} subprm;
} OUT_PBMSUBPRM;
typedef struct _T_MAXMODLENPRM{
unsigned char slv_no;
unsigned char slt_no;
unsigned char max_mod_len;
unsigned char pad;
} T_MAXMODLENPRM;
|
ERRORS
| Code | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
||||||||||||
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
||||||||||||
| EW_REJECT |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
profibus\pbm_wr_param
Sets the parameter of the PROFIBUS master function. (note) It is necessary to set slv_ind_para and slt_ind_para specified in IN_PBMPRMFLG and IN_PBMPRM.
PROTOTYPE
FWLIBAPI short WINAPI pbm_wr_param(unsigned short FlibHndl, short type, IN_PBMPRMFLG *flag, IN_PBMPRM *param);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type | in |
Specifies the kind of PROFIBUS master parameter.
/* parameter for each slave station */
/* parameter for each slot module */
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| flag | in |
Specifies the pointer to the IN_PBMPRMFLAG structure to indicate the item of the setting parameter.
/*- FLAG of MASTER FUNCTION ---------------------------------------*/
typedef struct _IN_PBMPRMFLG {
union {
T_BUS_PARA_FLG bus_para;
T_MODE_ADDR_ALLOC_FLG mode_addr_alloc;
T_SLAVE_SUB_PARA_FLG slv_sub_para;
T_SLAVE_PARA_FLG slv_para;
T_DGN_ADDR_ALLOC_FLG dgn_addr_alloc;
T_MODULE_DATA_FLG module_data;
T_DIDO_ADDR_ALLOC_FLG dido_addr_alloc;
} flg;
} IN_PBMPRMFLG;
/*- BUS PARAMETER -----------------------------------------*/
typedef struct _T_BUS_PARA_FLG {
char fdl_add; /* station no. */
char baud_rate;
char tsl;
char min_tsdr;
char max_tsdr;
char tqui;
char tset;
char ttr;
char g;
char hsa;
char max_retry_limit;
char bp_flag;
char min_slave_interval;
char poll_timeout;
char data_control_time;
char pad1;
char reserved[6];
char master_class2_name_rsv;
char pad2;
T_MAS_USR_FLG mas_usr;
} T_BUS_PARA_FLG;
/* MASTER USER DATA */
typedef struct _T_MAS_USR_FLG
{
char master_user_data_len;
char master_user_data;
} T_MAS_USR_FLG;
/*- ADDRESS ALLOCATION FOR MODE -----------------------------------*/
typedef struct _T_MODE_ADDR_ALLOC_FLG
{
char md_path;
char md_kind;
char md_top_address;
char md_size;
} T_MODE_ADDR_ALLOC_FLG;
/*- SLAVE SUB-PARAMETER -----------------------------------*/
typedef struct _T_SLAVE_SUB_PARA_FLG
{
T_SLAVE_IND_PARA_FLG slv_ind_para;
char slv_enable;
char slt_num;
} T_SLAVE_SUB_PARA_FLG;
/*- SLAVE PARAMETER -------------------------------------*/
typedef struct _T_SLAVE_PARA_FLG
{
T_SLAVE_IND_PARA_FLG slv_ind_para;
char sl_flag;
char slave_type;
char reserved[12];
T_PRM_DATA_FLG prm_data;
T_CFG_DATA_FLG cfg_data_rsv;
T_SLV_USR_DATA_FLG slv_usr;
} T_SLAVE_PARA_FLG;
/* PARAMETER DATA */
typedef struct _T_PRM_DATA_FLG
{
char station_status;
char wd_fact_1;
char wd_fact_2;
char min_tsdr;
char ident_number;
char group_ident;
T_USR_PRM_DATA_FLG usr_prm;
} T_PRM_DATA_FLG;
/* USER PARAMETER DATA */
typedef struct _T_USR_PRM_DATA_FLG
{
char user_prm_data_len;
char user_prm_data;
} T_USR_PRM_DATA_FLG;
/* CONFIGURATION DATA */
typedef struct _T_CFG_DATA_FLG
{
char cfg_data_len;
char cfg_data;
} T_CFG_DATA_FLG;
/* SLAVE USER DATA */
typedef struct _T_SLV_USR_DATA_FLG
{
char slave_user_data_len;
char slave_user_data;
} T_SLV_USR_DATA_FLG;
/*- ALLOCATION OF DIAGNOSIS DATA ---------------------------------------*/
typedef struct _T_DGN_ADDR_ALLOC_FLG
{
T_SLAVE_IND_PARA_FLG slv_ind_para;
char dgn_path;
char dgn_kind;
char dgn_top_address;
char dgn_size;
} T_DGN_ADDR_ALLOC_FLG;
/*- MODULE DATA ---------------------------------------*/
typedef struct _T_MODULE_DATA_FLG
{
T_SLOT_IND_PARA_FLG slt_ind_para;
char module_len;
char module_data;
} T_MODULE_DATA_FLG;
/*- ALLOCATION OF DI/DO DATA --------------------------------------*/
typedef struct _T_DIDO_ADDR_ALLOC_FLG
{
T_SLOT_IND_PARA_FLG slt_ind_para;
char di_path;
char do_path;
char di_kind;
char do_kind;
char di_top_address;
char do_top_address;
char di_size;
char do_size;
char module_type_rsv;
char pad;
} T_DIDO_ADDR_ALLOC_FLG;
/* SLAVE INDICATION PARAMETER */
typedef struct _T_SLAVE_IND_PARA_FLG
{
char slv_idx;
char slv_no;
} T_SLAVE_IND_PARA_FLG;
/* SLOT INDICATION PARAMETER */
typedef struct _T_SLOT_IND_PARA_FLG
{
char slv_no;
char slt_no;
} T_SLOT_IND_PARA_FLG;
"1" is substituted for the set item. Even if the value is substituted for the IN_PBMPRM structure in case of "0", the paramter cannot be set. /*- BUS PARAMETER ----------------------------------------*/
/* MASTER USER DATA */
/*- ADDRESS ALLOCATION FOR MODE ------------------------------------*/
/*- SLAVE SUB-PARAMETER -----------------------------------*/
/*- SLAVE PARAMETER -------------------------------------*/
/* PARAMETER DATA */
/* USER PARAMETER DATA */
/* CONFIGURATION DATA */
/* SLAVE USER DATA */
/*- ALLOCATION OF DIAGNOSIS DATA ---------------------------------------*/
/*- MODULE DATA ---------------------------------------*/
/*- ALLOCATION OF DI/DO DATA --------------------------------------*/
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| param | in |
Specifies the pointer to the IN_PBMPRM structure to store the setting parameter.
/*- parameter of master function -----------------------------------*/
typedef struct _IN_PBMPRM{
union {
T_BUS_PARA bus_para;
T_MODE_ADDR_ALLOC mode_addr_alloc;
T_SLAVE_SUB_PARA slv_sub_para;
T_SLAVE_PARA slv_para;
T_DGN_ADDR_ALLOC dgn_addr_alloc;
T_MODULE_DATA module_data;
T_DIDO_ADDR_ALLOC dido_addr_alloc;
} prm;
} IN_PBMPRM;
/*- BUS PARAMETER -----------------------------------------*/
typedef struct _T_BUS_PARA
{
unsigned char fdl_add; /* station no. */
unsigned char baud_rate;
unsigned short tsl;
unsigned short min_tsdr;
unsigned short max_tsdr;
unsigned char tqui;
unsigned char tset;
unsigned long ttr;
unsigned char g;
unsigned char hsa;
unsigned char max_retry_limit;
unsigned char bp_flag;
unsigned short min_slave_interval;
unsigned short poll_timeout;
unsigned short data_control_time;
unsigned char reserved[6];
char master_class2_name[32];
T_MAS_USR mas_usr;
} T_BUS_PARA;
/* MASTER USER DATA */
typedef struct _T_MAS_USR
{
unsigned short master_user_data_len;
unsigned char master_user_data[62];
} T_MAS_USR;
/*- ADDRESS ALLOCATION FOR MODE -----------------------------------*/
typedef struct _T_MODE_ADDR_ALLOC
{
unsigned char md_path;
unsigned char md_kind;
unsigned short md_top_address;
unsigned char md_size;
unsigned char pad;
} T_MODE_ADDR_ALLOC;
/*- SLAVE SUB-PARAMETER -----------------------------------*/
typedef struct _T_SLAVE_SUB_PARA
{
T_SLAVE_IND_PARA slv_ind_para;
unsigned char slv_enable;
unsigned char slt_num;
} T_SLAVE_SUB_PARA;
/*- SLAVE PARAMETER ----------------------------------------*/
typedef struct _T_SLAVE_PARA
{
T_SLAVE_IND_PARA slv_ind_para;
unsigned char sl_flag;
unsigned char slave_type;
unsigned char reserved[12];
T_PRM_DATA prm_data;
T_CFG_DATA cfg_data;
T_SLV_USR_DATA slv_usr;
} T_SLAVE_PARA;
/* PARAMETER DATA */
typedef struct _T_PRM_DATA
{
unsigned char station_status;
unsigned char wd_fact_1;
unsigned char wd_fact_2;
unsigned char min_tsdr;
unsigned short ident_number;
unsigned char group_ident;
unsigned char pad;
T_USR_PRM_DATA usr_prm;
} T_PRM_DATA;
/* USER PARAMETER DATA */
typedef struct _T_USR_PRM_DATA
{
unsigned short user_prm_data_len;
unsigned char user_prm_data[201];
unsigned char pad;
} T_USR_PRM_DATA;
/* CONFIGURATION DATA */
typedef struct _T_CFG_DATA
{
unsigned short cfg_data_len;
unsigned char cfg_data[128];
} T_CFG_DATA;
/* SLAVE USER DATA */
typedef struct _T_SLV_USR_DATA
{
unsigned short slave_user_data_len;
unsigned char slave_user_data[30];
} T_SLV_USR_DATA;
/*- ALLOCATION OF DIAGNOSIS DATA ---------------------------------------*/
typedef struct _T_DGN_ADDR_ALLOC
{
T_SLAVE_IND_PARA slv_ind_para;
unsigned char dgn_path;
unsigned char dgn_kind;
unsigned short dgn_top_address;
unsigned char dgn_size;
unsigned char pad;
} T_DGN_ADDR_ALLOC;
/*- MODULE DATA ---------------------------------------*/
typedef struct _T_MODULE_DATA
{
T_SLOT_IND_PARA slt_ind_para;
unsigned short module_len;
unsigned char module_data[128];
} T_MODULE_DATA;
/*- ALLOCATION OF DI/DO DATA --------------------------------------*/
typedef struct _T_DIDO_ADDR_ALLOC
{
T_SLOT_IND_PARA slt_ind_para;
unsigned char di_path;
unsigned char do_path;
unsigned char di_kind;
unsigned char do_kind;
unsigned short di_top_address;
unsigned short do_top_address;
unsigned char di_size;
unsigned char do_size;
unsigned char module_type;
unsigned char pad;
} T_DIDO_ADDR_ALLOC;
/* SLAVE INDICATION PARAMETER */
typedef struct _T_SLAVE_IND_PARA
{
unsigned char slv_idx;
unsigned char slv_no;
} T_SLAVE_IND_PARA;
/* SLOT INDICATION PARAMETER */
typedef struct _T_SLOT_IND_PARA
{
unsigned char slv_no;
unsigned char slt_no;
} T_SLOT_IND_PARA;
/*- BUS PARAMETER -----------------------------------------*/ /* MASTER USER DATA */ /*- ADDRESS ALLOCATION FOR MODE -----------------------------------*/ /*- SLAVE SUB-PARAMETER -----------------------------------*/ /*- SLAVE PARAMETER -------------------------------------*/ /* PARAMETER DATA */ /* USER PARAMETER DATA */ /* CONFIGURATION DATA */ /* SLAVE USER DATA */ /*- ALLOCATION OF DIAGNOSIS DATA --------------------------------------*/ /*- MODULE DATA ---------------------------------------*/ /*- ALLOCATION OF DI/DO DATA --------------------------------------*/ |
ERRORS
| Code | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
/*- BUS PARAMETER -------------------------*/
/* MASTER USER DATA */
/*- ADDRESS ALLOCATION FOR MODE -------------------*/
/*- SLAVE SUB-PARAMETER -------------------*/
/*- SLAVE PARAMETER ---------------------*/
/* PARAMETER DATA */
/* USER PARAMETER DATA */
/* CONFIGURATION DATA */
/* SLAVE USER DATA */
/*- ALLOCATION OF DIAGNOSIS DATA -----------------------*/
/*- MODULE DATA -----------------------*/
/*- ALLOCATION OF DI/DO DATA ----------------------*/
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_PROT |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_REJECT |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
profibus\pbs_ini_prm
Initializes the parameters of the PROFIBUS slave function.
PROTOTYPE
FWLIBAPI short WINAPI pbs_ini_prm(unsigned short FlibHndl, short type);
ARGUMENTS
| Name | Direction | Description | |||
|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||
| type | in |
Specifies the kind of parameterto initiate.
|
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
|||||||||
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
|||||||||
| EW_PROT |
Write operation is prohibited. In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
|||||||||
| EW_REJECT |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
profibus\pbs_rd_cominfo
Reads the communication state of the PROFIBUS slave function.
PROTOTYPE
FWLIBAPI short WINAPI pbs_rd_cominfo( unsigned short FlibHndl, OUT_PBSSTATUS *status );
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||
| status | out |
Specifies the pointer to the OUT_PBSSTATUS structure to store the communication status.
typedef struct OUT_PBSSTATUS{
unsigned char config_sts;
unsigned char param_sts;
unsigned char watchdog_sts;
unsigned char pad;
unsigned short ident_no;
} OUT_PBSSTATUS;
|
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
profibus\pbs_rd_cominfo2
Reads the communication state of the PROFIBUS slave function.
The status data is added to pbs_rd_cominfo function.
PROTOTYPE
FWLIBAPI short WINAPI pbs_rd_cominfo2( unsigned short FlibHndl, OUT_PBSSTATUS2 *status2 );
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||
| status2 | out |
Specifies the pointer to the OUT_PBSSTATUS2 structure to store the communication status.
typedef struct OUT_PBSSTATUS2{
unsigned char config_sts;
unsigned char param_sts;
unsigned char watchdog_sts;
unsigned char pad1;
unsigned short ident_no;
unsigned char sts;
unsigned char pad2;
} OUT_PBSSTATUS2;
|
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_VERSION |
Please use pbs_rd_cominfo function. |
|||||||||
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
|||||||||
| EW_REJECT |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
profibus\pbs_rd_param
Reads the parameters of the PROFIBUS slave function.
PROTOTYPE
FWLIBAPI short WINAPI pbs_rd_param( unsigned short FlibHndl, OUT_PBSPRM *param ) ;
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| param | out |
Specifies the pointer to the OUT_PBSPRM structure to store the the acquired parameter.
typedef struct _OUT_PBSPRM{
unsigned char slave_no;
unsigned char pad;
unsigned char di_size;
unsigned char do_size;
unsigned char di_path;
unsigned char do_path;
unsigned char di_kind;
unsigned char do_kind;
unsigned short di_top_address;
unsigned short do_top_address;
} OUT_PBSPRM;
|
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
|||||||||
| EW_REJECT |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
profibus\pbs_rd_param2
Reads the parameter of the PROFIBUS slave function.
The status data is added to pbs_rd_param
PROTOTYPE
FWLIBAPI short WINAPI pbs_rd_param2(unsigned short FlibHndl, OUT_PBSPRM2 *param2);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| param2 | out |
Specifies the pointer to the OUT_PBSPRM2 structure to store the the acquired parameter.
typedef struct _OUT_PBSPRM2{
unsigned char slave_no;
unsigned char pad;
unsigned char di_size;
unsigned char do_size;
unsigned char di_path;
unsigned char do_path;
unsigned char di_kind;
unsigned char do_kind;
unsigned short di_top_address;
unsigned short do_top_address;
unsigned char sts_path;
unsigned char sts_kind;
unsigned short sts_top_address;
} OUT_PBSPRM2;
|
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_VERSION |
Version mismatch between the CNC/PMC and library Please use pbs_rd_param function. In this case, PMC address of status data is the followings. - sts_path = 1 - sts_kind ='R' - sts_address = 9094 |
|||||||||
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
|||||||||
| EW_REJECT |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
profibus\pbs_wr_param
Sets the parameter of the PROFIBUS slave function.
(note) It is necessary to set slave_no specified in IN_PBSPRMFLG and IN_PBSPRM.
PROTOTYPE
FWLIBAPI short WINAPI pbs_wr_param( unsigned short FlibHndl, IN_PBSPRMFLG *flag, IN_PBSPRM *param );
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| flag | in |
Specifies the pointer to the IN_PBSPRMFLG structure to indicate the item of the setting parameter.
typedef struct _IN_PBSPRMFLG {
char slave_no;
char pad;
char di_size;
char do_size;
char di_path;
char do_path;
char di_kind;
char do_kind;
char di_top_address;
char do_top_address;
} IN_PBSPRMFLG;
"1" is substituted for the set item. Even if the value is substituted for the IN_PBSPRM structure in case of "0", the paramter cannot be set.
|
| param | in |
Specifies the pointer to the IN_PBSPRM structure to store the the setting parameter.
typedef struct _IN_PBSPRM{
unsigned char slave_no;
unsigned char pad;
unsigned char di_size;
unsigned char do_size;
unsigned char di_path;
unsigned char do_path;
unsigned char di_kind;
unsigned char do_kind;
unsigned short di_top_address;
unsigned short do_top_address;
} IN_PBSPRM;
|
ERRORS
| Code | Description | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
||||||||||||||||||||||||||||||
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
||||||||||||||||||||||||||||||
| EW_PROT |
Write operation is prohibited. In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
||||||||||||||||||||||||||||||
| EW_REJECT |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
profibus\pbs_wr_param2
Sets the parameter of the PROFIBUS slave function.
The status data is added to pbs_wr_param function.
(note) It is necessary to set slave_no specified in IN_PBSPRMFLG2 and IN_PBSPRM2.
PROTOTYPE
FWLIBAPI short WINAPI pbs_wr_param2( unsigned short FlibHndl, IN_PBSPRMFLG2 *flag2, IN_PBSPRM2 *param2 );
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| flag2 | in |
Specifies the pointer to the IN_PBSPRMFLG2 structure to indicate the item of the setting parameter.
typedef struct _IN_PBSPRMFLG2 {
char slave_no;
char pad1;
char di_size;
char do_size;
char di_path;
char do_path;
char di_kind;
char do_kind;
char di_top_address;
char do_top_address;
char sts_path;
char sts_kind;
char sts_top_address;
char pad2;
} IN_PBSPRMFLG2;
"1" is substituted for the set item. Even if the value is substituted for the IN_PBSPRM2 structure in case of "0", the paramter cannot be set.
|
| param2 | in |
Specifies the pointer to the IN_PBSPRM2 structure to store the the setting parameter.
typedef struct _IN_PBSPRM2{
unsigned char slave_no;
unsigned char pad;
unsigned char di_size;
unsigned char do_size;
unsigned char di_path;
unsigned char do_path;
unsigned char di_kind;
unsigned char do_kind;
unsigned short di_top_address;
unsigned short do_top_address;
unsigned char sts_path;
unsigned char sts_kind;
unsigned short sts_top_address;
} IN_PBSPRM2;
|
ERRORS
| Code | Description | |||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_VERSION |
Please use pbs_wr_param function. |
|||||||||||||||||||||||||||||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
|||||||||||||||||||||||||||||||||||||||
| EW_NOOPT |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
|||||||||||||||||||||||||||||||||||||||
| EW_PROT |
Write operation is prohibited. In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
|||||||||||||||||||||||||||||||||||||||
| EW_REJECT |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
profibus\pmc_prfrdallcadr
Reads the address allocation of the specified slave number.
This function is available at the version 01-07 and 09 or later of the PROFIBUS-DP control software(6557 Series).
In the control software in the version 08, the return value becomes EW_VERSION.
* Please refer to "PROFIBUS-DP function manual" for details of the PROFIBUS-DP function.
This function is unavailable at the 6558 Series.
PROTOTYPE
FWLIBAPI short WINAPI pmc_prfrdallcadr(unsigned short FlibHndl, short slave_no, IODBPRFADR *odb) ;
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| slave_no | in |
Specify the slave number to read. |
| odb | out |
Pointer to the IODBPRFADR structure including the address allocation. The IODBPRFADR structure is as follows.
typedef struct {
unsigned char di_size ;
char di_type ;
unsigned short di_addr ;
short reserve1;
unsigned char do_size ;
char do_type ;
unsigned short do_addr ;
short reserve2;
unsigned char dgn_size;
char dgn_type;
unsigned short dgn_addr;
} IODBPRFADR ;
|
ERRORS
| Code | Description |
|---|---|
| EW_RANGE |
Slave number(slave_no) is wrong. |
| EW_NOOPT |
|
| EW_VERSION |
This function was called by version 08 of the control software. Exchange the control software besides the version 08. |
profibus\pmc_prfrdbusprm
Reads the bus parameter of master function. This function is available at the version 01-07 and 09 or later of the PROFIBUS-DP control software(6557 Series).
In the control software in the version 08, the return value becomes EW_VERSION. * Please refer to "PROFIBUS-DP function manual" for details of the PROFIBUS-DP function.
This function is also available at the 6558 Series.
PROTOTYPE
FWLIBAPI short WINAPI pmc_prfrdbusprm(unsigned short FlibHndl, IODBBUSPRM *odb) ;
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||
| odb | out |
Pointer to the IODBBUSPRM structure including the bus parameter. The IODBBUSPRM structure is as follows.
typedef struct {
char fdl_add ;
char baudrate ;
unsigned short tsl ;
unsigned short min_tsdr ;
unsigned short max_tsdr ;
unsigned char tqui ;
unsigned char tset ;
long ttr ;
char gap ;
char hsa ;
char max_retry ;
unsigned char bp_flag ;
unsigned short min_slv_int ;
unsigned short poll_tout ;
unsigned short data_cntl ;
char reserve1[6] ;
char cls2_name[32] ;
short user_dlen ;
char user_data[62] ;
char reserve2[96] ;
} IODBBUSPRM ;
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
|
| EW_VERSION |
This function was called by version 08 of the control software. Exchange the control software besides the version 08. |
profibus\pmc_prfrdconfig
* Please refer to "PROFIBUS-DP function manual" for details of the PROFIBUS-DP function.
PROTOTYPE
FWLIBAPI short WINAPI pmc_prfrdconfig(unsigned short FlibHndl, ODBPRFCNF *odb) ;
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| odb | out |
Pointer to the ODBPRFCNF structure including the series/version of PROFIBUS software. The ODBPRFCNF structure is as follows.
typedef struct {
char master_ser[5]; /* Series of master function */
char master_ver[3]; /* Version of master function */
char slave_ser[5]; /* Series of slave function */
char slave_ver[3]; /* Version of slave function */
char cntl_ser[5]; /* Series of PROFIBUS control software */
char cntl_ver[3]; /* Version of PROFIBUS control software */
} ODBPRFCNF ;
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
|
profibus\pmc_prfrddido
Reads the DI/DO address data allocated in the slot of each slave station. * Please refer to "PROFIBUS-DP function manual" for details of the PROFIBUS-DP function.
This function is only for 6558 Series.
PROTOTYPE
FWLIBAPI short WINAPI pmc_prfrddido(unsigned short FlibHndl, short idx, IODBDIDO *odb) ;
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| idx | in |
Specify the index number for DI/DO address data. (0 - 47) |
||||||
| odb | out |
Pointer to the IODBDIDO structure storing the DI/DO address data.
typedef struct {
short slave_no ;
short slot_no ;
unsigned char di_size ;
char di_type ;
unsigned short di_addr ;
unsigned char do_size ;
char do_type ;
unsigned short do_addr ;
short shift;
unsigned char module_dlen ;
char module_data[128] ;
} IODBDIDO ;
|
ERRORS
| Code | Description |
|---|---|
| EW_RANGE |
Index number(idx) is wrong. |
| EW_NOOPT |
|
profibus\pmc_prfrdindiadr
Reads the indication address for communication mode of master function. * Please refer to "PROFIBUS-DP function manual" for details of the PROFIBUS-DP function.
This function is only for 6558 Series.
PROTOTYPE
FWLIBAPI short WINAPI pmc_prfrdindiadr(unsigned short FlibHndl, IODBINDEADR *odb) ;
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| odb | out |
Pointer to the IODBINDEADR structure storing the indication address of master function.
typedef struct {
unsigned char dummy ;
char indi_type ;
unsigned short indi_addr ;
} IODBINDEADR ;
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
|
profibus\pmc_prfrdopmode
Reads the operation mode of master function. * Please refer to "PROFIBUS-DP function manual" for details of the PROFIBUS-DP function.
This function is only for 6558 Series.
PROTOTYPE
FWLIBAPI short WINAPI pmc_prfrdopmode(unsigned short FlibHndl, short *mode) ;
ARGUMENTS
| Name | Direction | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||
| mode | out |
Pointer to the variable to which the operation mode of master function will be stored.
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
|
profibus\pmc_prfrdslvaddr
Reads the address allocation of slave function.
This function is available at the version 01-07 and 09 or later of the PROFIBUS-DP control software(6557 Series).
In the control software in the version 08, the return value becomes EW_VERSION.
* Please refer to "PROFIBUS-DP function manual" for details of the PROFIBUS-DP function.
This function is also available at the 6558 Series.
PROTOTYPE
FWLIBAPI short WINAPI pmc_prfrdslvaddr(unsigned short FlibHndl, IODBSLVADR *odb) ;
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| odb | out |
Pointer to the IODBSLVADR structure including the address allocation. The IODBSLVADR structure is as follows.
typedef struct {
char slave_no ;
unsigned char di_size ;
char di_type ;
unsigned short di_addr ;
unsigned char do_size ;
char do_type ;
unsigned short do_addr ;
char reserve[7] ;
} IODBSLVADR ;
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
|
| EW_VERSION |
This function was called by version 08 of the control software. Exchange the control software besides the version 08. |
profibus\pmc_prfrdslvid
Reads the slave index data that assigns the I/O module allocation for the specified Index number. * Please refer to "PROFIBUS-DP function manual" for details of the PROFIBUS-DP function.
This function is only for 6558 Series.
PROTOTYPE
FWLIBAPI short WINAPI pmc_prfrdslvid(unsigned short FlibHndl, short idx, IODBSLVID *odb) ;
ARGUMENTS
| Name | Direction | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||
| idx | in |
Specify the slave index number. (0-47) |
||||||||
| odb | out |
Pointer to the IODBSLVID structure storing the slave index data.
typedef struct {
short dis_enb ;
short slave_no ;
short nsl ;
unsigned char dgn_size ;
char dgn_type ;
unsigned short dgn_addr ;
} IODBSLVID ;
|
ERRORS
| Code | Description |
|---|---|
| EW_RANGE |
Index number(idx) is wrong. |
| EW_NOOPT |
|
profibus\pmc_prfrdslvprm
Reads the slave parameter of the specified slave number.
This function is available at the version 01-07 and 09 or later of the PROFIBUS-DP control software(6557 Series).
In the control software in the version 08, the return value becomes EW_VERSION.
* Please refer to "PROFIBUS-DP function manual" for details of the PROFIBUS-DP function.
This function is unavailable at the 6558 Series.
PROTOTYPE
FWLIBAPI short WINAPI pmc_prfrdslvprm(unsigned short FlibHndl, short slave_no, void *odb) ;
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| slave_no | in |
Specify the slave number to read. (0-125) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| odb | out |
Pointer to the structure including the slave parameter. This structure is different depending on the version of control software of PROFIBUS-DP(6557 Series).
typedef struct {
short dis_enb ;
unsigned short ident_no ;
unsigned char slv_flag ;
unsigned char slv_type ;
char reserve1[12] ;
unsigned char slv_stat ;
unsigned char wd_fact1 ;
unsigned char wd_fact2 ;
unsigned char min_tsdr ;
char reserve2 ;
unsigned char grp_ident ;
short user_plen ;
char user_pdata[32] ;
short cnfg_dlen ;
char cnfg_data[126] ;
short slv_ulen ;
char slv_udata[30] ;
char reserve3[8] ;
} IODBSLVPRM ;
typedef struct {
short dis_enb ;
unsigned short ident_no ;
unsigned char slv_flag ;
unsigned char slv_type ;
char reserve1[12] ;
unsigned char slv_stat ;
unsigned char wd_fact1 ;
unsigned char wd_fact2 ;
unsigned char min_tsdr ;
char reserve2 ;
unsigned char grp_ident ;
short user_plen ;
char user_pdata[206] ;
short cnfg_dlen ;
char cnfg_data[126] ;
short slv_ulen ;
char slv_udata[30] ;
char reserve3[8] ;
} IODBSLVPRM2 ;
|
ERRORS
| Code | Description |
|---|---|
| EW_RANGE |
Slave number(slave_no) is wrong. |
| EW_NOOPT |
|
| EW_VERSION |
This function was called by version 08 of the control software. Exchange the control software besides the version 08. |
profibus\pmc_prfrdslvprm2
Reads the slave parameter of the specified slave Index number. * Please refer to "PROFIBUS-DP function manual" for details of the PROFIBUS-DP function.
This function is only for 6558 Series.
PROTOTYPE
FWLIBAPI short WINAPI pmc_prfrdslvprm2(unsigned short FlibHndl, short idx, IODBSLVPRM3 *odb) ;
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||
| idx | in |
Specify the slave index number. (0 - 47) |
|||||||||||||||||||||||||||||||||||||||||||||||||||
| odb | out |
Pointer to the IODBSLVPRM3 structure storing the slave parameter.
typedef struct {
unsigned short ident_no ;
unsigned char slv_flag ;
unsigned char slv_type ;
char reserve1[12] ;
unsigned char slv_stat ;
unsigned char wd_fact1 ;
unsigned char wd_fact2 ;
unsigned char min_tsdr ;
char reserve2 ;
unsigned char grp_ident ;
short user_plen ;
char user_pdata[206] ;
short slv_ulen ;
char slv_udata[30] ;
} IODBSLVPRM3 ;
|
ERRORS
| Code | Description |
|---|---|
| EW_RANGE |
Index number(idx) is wrong. |
| EW_NOOPT |
|
profibus\pmc_prfrdslvstat
Reads the state of slave function.
This function is available at the version 01-07 and 09 or later of the PROFIBUS-DP control software(6557 Series).
In the control software in the version 08, the return value becomes EW_VERSION.
* Please refer to "PROFIBUS-DP function manual" for details of the PROFIBUS-DP function.
This function is also available at the 6558 Series.
PROTOTYPE
FWLIBAPI short WINAPI pmc_prfrdslvstat(unsigned short FlibHndl, ODBSLVST *odb) ;
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||
| odb | out |
Pointer to the ODBSLVST structure including the state of slave function. The ODBSLVST structure is as follows.
typedef struct {
unsigned char cnfg_stat ;
unsigned char prm_stat ;
char wdg_stat ;
unsigned char live_stat ;
short ident_no ;
} ODBSLVST ;
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
|
| EW_VERSION |
This function was called by version 08 of the control software. Exchange the control software besides the version 08. |
profibus\pmc_prfwrallcadr
Sets the address allocation to the specified slave number.
This function is available at the version 01-07 and 09 or later of the PROFIBUS-DP control software(6557 Series).
In the control software in the version 08, the return value becomes EW_VERSION.
* Please refer to "PROFIBUS-DP function manual" for details of the PROFIBUS-DP function.
When the parameters are changed, the restart of CNC is required for putting the change into effect.
This function is unavailable at the 6558 Series.
PROTOTYPE
FWLIBAPI short WINAPI pmc_prfwrallcadr(unsigned short FlibHndl, short slave_no, IODBPRFADR *idb) ;
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||
| slave_no | in |
Specify the slave number to set. |
||||||||||||||||||||||||
| idb | in |
Pointer to the IODBPRFADR structure including the address allocation. The IODBPRFADR structure is as follows.
typedef struct {
unsigned char di_size ;
char di_type ;
unsigned short di_addr ;
short reserve1;
unsigned char do_size ;
char do_type ;
unsigned short do_addr ;
short reserve2;
unsigned char dgn_size;
char dgn_type;
unsigned short dgn_addr;
} IODBPRFADR ;
|
ERRORS
| Code | Description | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_RANGE |
Slave number(slave_no) is wrong. |
|||||||||||||||||||||||||||
| EW_DATA |
The specification of the address allocation is wrong. In order to get more information for this err_no return value, execute pmc_getdtailerr function. The following details status will be set onto the member, err_no of ODBPMCERR structure.
|
|||||||||||||||||||||||||||
| EW_NOOPT |
|
|||||||||||||||||||||||||||
| EW_VERSION |
This function was called by version 08 of the control software. Exchange the control software besides the version 08. |
profibus\pmc_prfwrbusprm
Writes the bus parameter of master function.
This function is available at the version 01-07 and 09 or later of the
PROFIBUS-DP control software(6557 Series). In the control software in
the version 08, the return value becomes EW_VERSION.
* Please refer to "PROFIBUS-DP function manual" for details of the PROFIBUS-DP function.
When the parameters are changed, the restart of CNC is required for putting the change into effect.
This function is also available at the 6558 Series.
PROTOTYPE
FWLIBAPI short WINAPI pmc_prfwrbusprm(unsigned short FlibHndl, IODBBUSPRM *idb) ;
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||
| idb | in |
Pointer to the IODBBUSPRM structure including the bus parameter. The IODBBUSPRM structure is as follows.
typedef struct {
char fdl_add ;
char baudrate ;
unsigned short tsl ;
unsigned short min_tsdr ;
unsigned short max_tsdr ;
unsigned char tqui ;
unsigned char tset ;
long ttr ;
char gap ;
char hsa ;
char max_retry ;
unsigned char bp_flag ;
unsigned short min_slv_int ;
unsigned short poll_tout ;
unsigned short data_cntl ;
char reserve1[6] ;
char cls2_name[32] ;
short user_dlen ;
char user_data[62] ;
char reserve2[96] ;
} IODBBUSPRM ;
|
ERRORS
| Code | Description | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_DATA |
The bus parameter is wrong. In order to get more information for this err_no return value, execute pmc_getdtailerr function. The following details status will be set onto the member, err_no of ODBPMCERR structure.
|
||||||||||||||||||||||||||||||||||||||||||
| EW_NOOPT |
|
||||||||||||||||||||||||||||||||||||||||||
| EW_VERSION |
This function was called by version 08 of the control software. Exchange the control software besides the version 08. |
profibus\pmc_prfwrdido
Writes the DI/DO address data allocated in the slot of each slave station. * Please refer to "PROFIBUS-DP function manual" for details of the PROFIBUS-DP function.
When the parameters are changed, the restart of CNC is required for putting the change into effect.
This function is only for 6558 Series.
PROTOTYPE
FWLIBAPI short WINAPI pmc_prfwrdido(unsigned short FlibHndl, short idx, IODBDIDO *idb) ;
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| idx | in |
Specify the index number for DI/DO address data. (0 - 47) |
||||||
| idb | in |
Pointer to the IODBDIDO structure including the DI/DO address data.
typedef struct {
short slave_no ;
short slot_no ;
unsigned char di_size ;
char di_type ;
unsigned short di_addr ;
unsigned char do_size ;
char do_type ;
unsigned short do_addr ;
short shift;
unsigned char module_dlen ;
char module_data[128] ;
} IODBDIDO ;
|
ERRORS
| Code | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_RANGE |
Index number(idx) is wrong. When "idx=-1" is specified, if idb->slave_no or idb->slot_no is wrong, this error occurs. |
||||||||||||||||||||||||
| EW_DATA |
The specification of the address allocation is wrong. In order to get more information for this err_no return value, execute pmc_getdtailerr function. The following details status will be set onto the member, err_no of ODBPMCERR structure.
|
||||||||||||||||||||||||
| EW_NOOPT |
|
profibus\pmc_prfwrindiadr
Writes the indication address for communication mode of master function. * Please refer to "PROFIBUS-DP function manual" for details of the PROFIBUS-DP function.
When the parameters are changed, the restart of CNC is required for putting the change into effect.
This function is only for 6558 Series.
PROTOTYPE
FWLIBAPI short WINAPI pmc_prfwrindiadr(unsigned short FlibHndl, IODBINDEADR *idb) ;
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| idb | in |
Pointer to the IODBINDEADR structure including the indication address of master function.
typedef struct {
unsigned char dummy ;
char indi_type ;
unsigned short indi_addr ;
} IODBINDEADR ;
|
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_DATA |
The specification of the address allocation is wrong. In order to get more information for this err_no return value, execute pmc_getdtailerr function. The following details status will be set onto the member, err_no of ODBPMCERR structure.
|
||||||
| EW_NOOPT |
|
profibus\pmc_prfwropmode
Writes the operation mode of master function. * Please refer to "PROFIBUS-DP function manual" for details of the PROFIBUS-DP function.
This function is only for 6558 Series.
PROTOTYPE
FWLIBAPI short WINAPI pmc_prfwropmode(unsigned short FlibHndl, short mode, short *res) ;
ARGUMENTS
| Name | Direction | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||
| mode | in |
Specify the operation mode for master function.
|
|||||||||||||||
| res | out |
The message number as the result of setting the operation mode is set.
|
ERRORS
| Code | Description |
|---|---|
| EW_ATTRIB |
The operation mode(mode) was wrong. |
| EW_NOOPT |
|
profibus\pmc_prfwrslvaddr
Sets the address allocation of slave function.
This function is available at the version 01-07 and 09 or later of the PROFIBUS-DP control software(6557 Series).
In the control software in the version 08, the return value becomes EW_VERSION.
* Please refer to "PROFIBUS-DP function manual" for details of the PROFIBUS-DP function.
When the parameters are changed, the restart of CNC is required for putting the change into effect.
This function is also available at the 6558 Series.
PROTOTYPE
FWLIBAPI short WINAPI pmc_prfwrslvaddr(unsigned short FlibHndl, IODBSLVADR *idb) ;
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||
| idb | in |
Pointer to the IODBSLVADR structure including the address allocation. The IODBSLVADR structure is as follows.
typedef struct {
char slave_no ;
unsigned char di_size ;
char di_type ;
unsigned short di_addr ;
unsigned char do_size ;
char do_type ;
unsigned short do_addr ;
char reserve[7] ;
} IODBSLVADR ;
|
ERRORS
| Code | Description | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_DATA |
The specification of the address allocation is wrong. In order to get more information for this err_no return value, execute pmc_getdtailerr function. The following details status will be set onto the member, err_no of ODBPMCERR structure.
|
|||||||||||||||||||||
| EW_NOOPT |
|
|||||||||||||||||||||
| EW_VERSION |
This function was called by version 08 of the control software. Exchange the control software besides the version 08. |
profibus\pmc_prfwrslvid
Writes the slave index data that assigns the I/O module allocation for the specified Index number. * Please refer to "PROFIBUS-DP function manual" for details of the PROFIBUS-DP function.
The slot allocation of each slave station can be changed by this function.
When the parameters are changed, the restart of CNC is required for putting the change into effect.
Once the system is powered-off and on, configured entries are sorted in the order of "NO" (Slave number) automatically.
This function is only for 6558 Series.
PROTOTYPE
FWLIBAPI short WINAPI pmc_prfwrslvid(unsigned short FlibHndl, short idx, IODBSLVID *idb) ;
ARGUMENTS
| Name | Direction | Description | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||
| idx | in |
Specify the slave index number. (0-47) |
||||||||||||||
| idb | in |
Pointer to the IODBSLVID structure including the slave index data.
typedef struct {
short dis_enb ;
short slave_no ;
short nsl ;
unsigned char dgn_size ;
char dgn_type ;
unsigned short dgn_addr ;
} IODBSLVID ;
|
ERRORS
| Code | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_RANGE |
Index number(idx) is wrong. |
||||||||||||||||||
| EW_DATA |
The bus parameter is wrong. In order to get more information for this err_no return value, execute pmc_getdtailerr function. The following details status will be set onto the member, err_no of ODBPMCERR structure.
|
||||||||||||||||||
| EW_NOOPT |
|
profibus\pmc_prfwrslvprm
Writes the slave parameter of the specified slave number.
This function is available at the version 01-07 and 09 or later of the
PROFIBUS-DP control software(6557 Series). In the control software in
the version 08, the return value becomes EW_VERSION.
* Please refer to "PROFIBUS-DP function manual" for details of the
PROFIBUS-DP function.
When the parameters are changed, the restart of CNC is required for putting the change into effect.
This function is unavailable at the 6558 Series.
PROTOTYPE
FWLIBAPI short WINAPI pmc_prfwrslvprm(unsigned short FlibHndl, short slave_no, void *idb) ;
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| slave_no | in |
Specify the slave number to write. (0〜125) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| idb | in |
Pointer to the structure including the slave parameter. This structure is different depending on the version of control software of PROFIBUS-DP(6557 Series).
typedef struct {
short dis_enb ;
unsigned short ident_no ;
unsigned char slv_flag ;
unsigned char slv_type ;
char reserve1[12] ;
unsigned char slv_stat ;
unsigned char wd_fact1 ;
unsigned char wd_fact2 ;
unsigned char min_tsdr ;
char reserve2 ;
unsigned char grp_ident ;
short user_plen ;
char user_pdata[32] ;
short cnfg_dlen ;
char cnfg_data[126] ;
short slv_ulen ;
char slv_udata[30] ;
char reserve3[8] ;
} IODBSLVPRM ;
typedef struct {
short dis_enb ;
unsigned short ident_no ;
unsigned char slv_flag ;
unsigned char slv_type ;
char reserve1[12] ;
unsigned char slv_stat ;
unsigned char wd_fact1 ;
unsigned char wd_fact2 ;
unsigned char min_tsdr ;
char reserve2 ;
unsigned char grp_ident ;
short user_plen ;
char user_pdata[206] ;
short cnfg_dlen ;
char cnfg_data[126] ;
short slv_ulen ;
char slv_udata[30] ;
char reserve3[8] ;
} IODBSLVPRM2 ;
|
ERRORS
| Code | Description | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_RANGE |
Slave number(slave_no) is wrong. |
|||||||||||||||||||||
| EW_DATA |
The slave parameter is wrong. In order to get more information for this err_no return value, execute pmc_getdtailerr function. The following details status will be set onto the member, err_no of ODBPMCERR structure.
|
|||||||||||||||||||||
| EW_NOOPT |
|
|||||||||||||||||||||
| EW_VERSION |
This function was called by version 08 of the control software. Exchange the control software besides the version 08. |
profibus\pmc_prfwrslvprm2
Writes the slave parameter of the specified slave Index number. * Please refer to "PROFIBUS-DP function manual" for details of the PROFIBUS-DP function.
When the parameters are changed, the restart of CNC is required for putting the change into effect.
This function is only for 6558 Series.
PROTOTYPE
FWLIBAPI short WINAPI pmc_prfwrslvprm2(unsigned short FlibHndl, short idx, IODBSLVPRM3 *idb);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||
| idx | in |
Specify the slave index number. (0 - 47) |
|||||||||||||||||||||||||||||||||||||||||||||||||||
| idb | in |
Pointer to the IODBSLVPRM3 structure including the slave parameter.
typedef struct {
unsigned short ident_no ;
unsigned char slv_flag ;
unsigned char slv_type ;
char reserve1[12] ;
unsigned char slv_stat ;
unsigned char wd_fact1 ;
unsigned char wd_fact2 ;
unsigned char min_tsdr ;
char reserve2 ;
unsigned char grp_ident ;
short user_plen ;
char user_pdata[206] ;
short slv_ulen ;
char slv_udata[30] ;
} IODBSLVPRM3 ;
|
ERRORS
| Code | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_RANGE |
Index number(idx) is wrong. |
|||||||||||||||
| EW_DATA |
The slave parameter is wrong. In order to get more information for this err_no return value, execute pmc_getdtailerr function. The following details status will be set onto the member, err_no of ODBPMCERR structure.
|
|||||||||||||||
| EW_REJECT |
The slave index data is not set. In order to get more information for this err_no return value, execute pmc_getdtailerr function. The following details status will be set onto the member, err_no of ODBPMCERR structure.
|
|||||||||||||||
| EW_NOOPT |
|
program\cnc_buff
Reads the number of empty buffers used for downloading/verification.
If there is no space for buffer, this function returns error
(EW_BUFFER), otherwise, this function set the number of empty buffer.
PROTOTYPE
FWLIBAPI short WINAPI cnc_buff(unsigned short FlibHndl,ODBBUF *buffer);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. |
| buffer | out |
Pointer to the ODBBUF structure including the empty situation.
typedef struct odbbuf {
short dummy[2] ; /* Not used. */
short data ; /* Empty counter.(1 - 3) */
} ODBBUF ;
|
ERRORS
| Code | Description |
|---|---|
| EW_RESET |
Call the cnc_dwnend(HSSB only) or cnc_dwnend3 or cnc_vrfend function. |
| EW_BUFFER |
There is no space with buffer. |
program\cnc_cdnc
Sends NC command data to CNC(for DNC operation). When the data processing on the CNC side is delayed and the next data cannot be transferred, error(EW_BUFFER) is returned. Except the above-mentioned difference, function is the same ascnc_dnc, so refer to cnc_dnc function for other description.
If an application will wait the data transferring, use the cnc_dnc function.
Note1) The G130 function of Power Mate i-H cannot be used.
PROTOTYPE
FWLIBAPI short WINAPI cnc_cdnc(unsigned short FlibHndl,char *data, short number);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. |
| number | in |
Specify the number of characters of NC program data.(1,..,256) (In case of High Speed DNC of SeriesSeries 16/18/21, 16i/18i/21i, 0i, it is 1,..,40959) |
| data | out |
Specify the top address of NC program data. |
ERRORS
| Code | Description |
|---|---|
| EW_RESET |
'RESET or STOP' was pushed. Call the cnc_dncend function. |
| EW_FUNC |
|
| EW_LENGTH |
Length of data block(number) exceeds 256 bytes. (In case of High Speed DNC of Series 16/18/21, 16i/18i/21i, 0i : 40959 bytes) |
| EW_BUFFER |
Retry because the buffer is full. |
program\cnc_cdownload
Outputs NC program to be registered(downloading).
When the data processing on the CNC side is delayed and the next data
cannot be transferred, error(EW_BUFFER) is returned.
Except the above-mentioned difference, function is the same as
"Download NC program(cnc_download)",
so refer to cnc_download
If an application will wait the data transferring,
use the cnc_download function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_cdownload(unsigned short FlibHndl,char *data, short number);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. |
| data | in |
Specify the top address of NC program data. |
| number | in |
Specify the number of characters of NC program data. (1 - 256) |
ERRORS
| Code | Description |
|---|---|
| EW_RESET |
CNC required to stop downloading. 'RESET or STOP' was pushed.(Series 15/15i) Call the cnc_dwnend function. |
| EW_FUNC |
|
| EW_LENGTH |
Length of data block(number) exceeds 256 bytes. |
| EW_DATA |
|
| EW_PROT |
Tape memory is write-protected by the CNC parameter setting(O8000-/O9000- protection, encoding). See Description about the timing of error. |
| EW_OVRFLOW |
CNC tape memory shorts for the registration. Make enough free area in CNC memory. See Description about the timing of error. |
| EW_BUFFER |
Retry because the buffer is full. |
program\cnc_condense
Condenses the specified program or all programs.
PROTOTYPE
FWLIBAPI short WINAPI cnc_condense(unsigned short FlibHndl,short type, long progno);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| type | in |
Specify the following listed kind of the program to be condensed.
|
||||||
| progno | in |
Specify a program number to be condensed. |
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_ATTRIB |
The kind of program (type) is wrong. |
|||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
|||||||||
| EW_NOOPT |
The extended driver/library function is necessary. |
|||||||||
| EW_PROT |
|
|||||||||
| EW_MODE |
|
|||||||||
| EW_REJECT |
MDI edit or Background edit processing in CNC side. |
program\cnc_copyprog
Copy the NC program.
PROTOTYPE
FWLIBAPI short WINAPI cnc_copyprog(unsigned short FlibHndl, long src_no, long dst_no);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. |
| src_no | in |
Specify the source NC program number. |
| dst_no | in |
Specify the destination NC program number. |
| FlibHndl | in |
Specify the library handle. |
| src_no | in |
Specify the source NC program number. |
| dst_no | in |
Specify the destination NC program number. |
ERRORS
| Code | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_BUSY |
|
||||||||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
||||||||||||||||||
| EW_NOOPT |
The extended driver/library function is necessary. |
||||||||||||||||||
| EW_MODE |
MDI edit or Background edit processing in CNC side. (except 30i/31i/32i, 0i-D/F, PMi-A) |
||||||||||||||||||
| EW_PROT |
|
||||||||||||||||||
| EW_OVRFLOW |
Program registration area is full. |
||||||||||||||||||
| EW_ALARM |
Release the alarm(PS000 and PS101). |
program\cnc_cupload
Read NC program registered on the tape memory in CNC (program memory).
As for the Data window interface, this function is quite the same with the
cnc_upload function .
Refer to cnc_upload function for the format of input data, etc.
PROTOTYPE
FWLIBAPI short WINAPI cnc_cupload(unsigned short FlibHndl,ODBUP *upld,unsigned short *number);
ARGUMENTS
| Name | Direction | Description |
|---|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
| EW_LENGTH |
The read number of characters of NC program number(*number) is 0. |
program\cnc_cverify
Outputs NC program to be compared with already registered one to CNC.
When the data processing on the CNC side is delayed and the next data
cannot be transferred, error(EW_BUFFER) is returned.
Except the above-mentioned difference, function is the same as "Verify NC program
(cnc_verify)",
so refer to "cnc_verify" function for
other description.
If an application will wait the data transferring, use the cnc_verify function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_cverify(unsigned short FlibHndl, char *data, short number);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| data | in |
Specify the top address of NC program data. |
| number | in |
Specify the number of characters of NC program data. (1 - 256) |
ERRORS
| Code | Description |
|---|---|
| EW_RESET |
CNC required to stop verification. 'RESET or STOP' was pushed.(Series 15/15i) Call the cnc_vrfend function.
CNC required to stop verification. Call the cnc_vrfend function. |
| EW_LENGTH |
Length of data block(number) exceeds 256 bytes. |
| EW_FUNC |
|
| EW_DATA |
|
| EW_BUFFER |
Retry because the buffer is full. |
program\cnc_delall
Deletes all NC programs registered in CNC. The protected programs cannot be deleted. In case of Series 15/15i, deletion is delayed under the following condition.
• Edit processing in the CNC side(include background edit processing)
This function is a function equal with all NC program deletions by "O-9999".
• Downloading, verifying
PROTOTYPE
FWLIBAPI short WINAPI cnc_delall(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
ERRORS
| Code | Description |
|---|---|
| EW_BUSY |
Series 15i(Ethernet only)
Series 30i/31i/32i, 0i-D/F, PMi-A
Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
|
| EW_PROT |
|
| EW_PASSWD(Ethernet) |
(Series 16i/18i/21i, 0i-A/B/C) |
program\cnc_delete
Deletes the specified NC program registered in CNC.
The program which is executed or selected in foreground by CNC cannot be deleted. In case of Series 15/15i, deletion is delayed under the following condition.
And the protected program cannot be deleted.
In Series 16/18, 16i/18i, 0i-F, 30i, Power Mate i, it is possible to use this function for
the program number 8 digits, however it is necessary to switch API to
the one for the program number 8 digits.
In Series 15i, it is necessary to switch API to the one for the program number 8 digits.
See Program number 8 digits for details.
PROTOTYPE
FWLIBAPI short WINAPI cnc_delete(unsigned short FlibHndl,short number);For the program number 8 digits :
FWLIBAPI short WINAPI cnc_delete(unsigned short FlibHndl,long number);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| number | in |
Specify program number. |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This application is not customized for the program number 8 digits. See "Program number 8 digits" for details. |
| EW_BUSY |
Series 30i, 0i-D/F, PMi-A, 15i(Ethernet only)
Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
|
| EW_DATA |
|
| EW_PROT |
|
| EW_PASSWD(Ethernet) |
|
program\cnc_delprogline
Deletes the NC program by line basis. When you specify the line including O number(ex.""Oxxxx""), this function deletes the character after O number, but doesn't delete O number.
The conditions of the function about CNC mode and the kind of program are as follows.
Example)
You have the following program you are going to delete by line basis.
O1234(TEST PROGRAM) ;
G01 X0. F100 ;
X20. ;
M30 ;
%
When you delete 3 lines from the line number 0 for the above program, then you get the following result.
O1234 M30 ;
%
O: Available / ×: Not available (The return code is EW_MODE)
EDIT mode
MDI mode
Other mode
MDI program
×
O
×
Selected program
O
×
×
Not selected program
O
O
O
If you have the playback option, TJOG/THND mode is the same as EDIT.
This function works normally if OP signal is 1 but STL signal is 0 (for example, feed hold stopping, single block stopping, etc).
When you use this function for the MDI program or the selected program in the following situations, the execution pointer goes to the top of line specified by line_no.
- MDI program in MDI mode.
- Selected program in EDIT mode.
- Selected program in TJOG/THND mode with the playback option.
PROTOTYPE
FWLIBAPI short WINAPI cnc_delprogline(unsigned short FlibHndl, long prog_no, unsigned long line_no, unsigned long line_len);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| prog_no | in |
Specify the program number to delete. |
| line_no | in |
Specify the line number to delete from. |
| line_len | in |
Specify the amount of lines to delete. |
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_BUSY |
|
|||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
|||||||||
| EW_NOOPT |
The extended driver/library function is necessary. |
|||||||||
| EW_PROT |
CNC parameter is a state of write-protection(O8000-/O9000- protection, encoding). Protect KEY signal was ON. (Deletion of the MDI program is excluded)(except 30i/31i/32i, 0i-D/F, PMi-A) |
|||||||||
| EW_MODE |
|
|||||||||
| EW_REJECT |
|
program\cnc_delrange
Deletes the specified NC program(area specified) registered in CNC. When the running program is included within the range of the specified program, the running program which included the subprogram is not
deleted. The selected program by foreground in MEM mode is not deleted. And, the protected program is not deleted too.
PROTOTYPE
FWLIBAPI short WINAPI cnc_delrange(unsigned short FlibHndl, long s_number, long e_number);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| s_number | in |
Specifyed the start program number which you wants to delete. |
| e_number | in |
Specify the end program number which you wants to delete. |
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_BUSY |
|
|||||||||
| EW_NUMBER |
Program number(s_number,e_number) is negative. |
|||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
|||||||||
| EW_PROT |
Protection KEY(DI) turns off. |
|||||||||
| EW_REJECT |
MDI edit or Background edit processing in CNC side. |
program\cnc_dnc
Sends NC command data to CNC(for DNC operation). When the data processing on the CNC side is delayed and the data cannot be transferred, The procedure of DNC operation is as follows.
In case of Series 15, the parameter No.20 must be set to '15'. In case of Series 16/18/21, 0i, Power Mate i, "DMMC" signal(DI)<G042#7> must be on. For transferring the data, there are 16 buffers of 256 bytes in case of
Series 15, and there are 4 buffers of 256 bytes in case of Series 16/
18/21, 16i/18i/21i, 0i, Power Mate i.
For series Series 16/18/21, 16i/18i/21i, 0i system, set the CNC parameter (No.8706#0=1)
to make the High Speed DNC interface be available.
Because importance is attached to the speed of data transfer to the CNC, in general, return of errors(EW_DATA, etc.) may be delayed.
Format of NC command data to be executed
'LF' must be placed at the top of the whole NC commands, and '%' at the end.
this function waits until it can be transferred.
If an application cannot wait, use the cnc_cdnc function.
Even if this setting is not done, this function does not return error.
Even if this setting is not done, this function does not return error.
One buffer is used at each cnc_dnc calling without any relation to the
data size. Therefore, the maximum size which can be transferred by one
calling is 256 bytes.
High Speed DNC uses the single data buffer, which is 40K bytes size ring buffer.
Application can call the cnc_dnc() multiple times until the buffer becomes full.
Namely, an error status may refrect the result caused by the previously executed cnc_dnc callings.
And the error status for some cnc_dnc callings just before the finish of DNC transferring is returned by "End of DNC".
NC command data to be executed on CNC is a string composed of ASCII characters as following format.
LF NC command1 LF NC command2 LF ... LF Mxx LF %
where,
LF
0x0A ('\n': EOB)
Mxx
M code at the end of the DNC operation(M02,M30,etc.)
'LF's are added after each NC commands.
For example, to execute the commands such as
M3 S2000 ;
send a following string using cnc_dnc function.
T14 ;
G0 X10. ;
G0 Z-5. ;
M30 ;
cnc_dnc( "\nM3S2000\nT14\nG0X10.\nG0Z-5.\nM30\n%", 32 ) ;
The string data can be sent by multiple cnc_dnc functions.
For above example, the commands can be sent block by block like this.
cnc_dnc( "\n", 1 ) ;
cnc_dnc( "M3S2000\n", 8 ) ;
cnc_dnc( "T14\n", 4 ) ;
cnc_dnc( "G0X10.\n", 7 ) ;
cnc_dnc( "G0Z-5.\n", 7 ) ;
cnc_dnc( "M30\n", 4 ) ;
cnc_dnc( "%", 1 ) ;
| Note1) The G130 function of Power Mate i-H cannot be used. |
PROTOTYPE
FWLIBAPI short WINAPI cnc_dnc(unsigned short FlibHndl,char *data, unsigned short number);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. |
| number | in |
Specify the number of characters of NC program data.(1,..,256) (In case of High Speed DNC of SeriesSeries 16/18/21, 16i/18i/21i, 0i, it is 1,..,40959) |
| data | in |
Specify the top address of NC program data. |
ERRORS
| Code | Description |
|---|---|
| EW_RESET |
'RESET or STOP' was pushed. Call the cnc_dncend function. |
| EW_FUNC |
|
| EW_LENGTH |
Length of data block(number) exceeds 256 bytes. (In case of High Speed DNC of Series 16/18/21, 16i/18i/21i, 0i : 40959 bytes) |
program\cnc_dnc2
Outputs the NC part program for DNC operation or M198 operation to CNC.
This function outputs the characters of NC program as long as it is specified by '*length'('length').
In case that this function cannot output at least one character,
it returns EW_BUFFER, so again call this function with the same arguments.
When DNC operation or M198 operation is aborted on CNC side, this function returns EW_RESET. Following shows the format of NC part program to be output.
EOB CMD1 EOB CMD2 EOB ..... CMDn EOB Mxx EOB
However, if there is no room to store the specified number of character, this function stores the
characters as many as possible to fill the buffer and then sets '*length'('length') with the real number of characters which are stored in the buffer.
In this case, call cnc_dncend2 with
DNC_CANCEL as the output result in order to terminate the output of NC program.
CMD1...n
ASCII character string
EOB
LF(0x0A)
Mxx
M code that shows the termination of
DNC operation. (M02 or M30, etc.)
In case of M198 operation, 'M99' must be specified to 'Mxx'.
|
Please be careful !!! When dnc function is used with Ethernet, the transfer rate is not secured by the state of the network. And, this function is not available to Embedded Ethernet. |
PROTOTYPE
FWLIBAPI short WINAPI cnc_dnc2(unsigned short FlibHndl, long *length, char *data);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| length | in/out |
The pointer of long type variable where the number of the
characters that are output from MMC function is set. This function returns EW_LENGTH if '*length'('length') has the value of zero or negative. |
| data | in |
The pointer of the area where NC part program to be output is stored. |
ERRORS
| Code | Description |
|---|---|
| EW_RESET |
'RESET or STOP' was pushed. Call the cnc_dncend2 function. |
| EW_FUNC |
|
| EW_LENGTH |
The size of character string is negative. |
| EW_BUFFER |
Retry because the buffer is full. |
| EW_PARAM |
the following CNC parameter must be set. Series 15/15i 7713#0 = 1 Series 16/18/21, 16i/18i/21i, 0i-A/B/C 8706#1 = 1 |
| EW_NOOPT |
The extended driver/library function is necessary. |
program\cnc_dncend
Notifies the end of DNC operation to CNC. Execute this stopping command after the CNC's operation has been completed and reset. Check "OP" signal(Series 15:F000#5, Series16/18/21, 16i/18i/21i,0i, Power Mate i:F000#7) to find whether CNC has been reset or not. There are cases where error(EW_DATA) during execution of downloading DNC program is returned by this function.
When this command is executed during CNC is operating, the function call waits until the end of operation and reset.
When "OP" signal is "0", CNC is has been reset.
PROTOTYPE
FWLIBAPI short WINAPI cnc_dncend(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
| EW_DATA |
|
program\cnc_dncend2
Notifies the termination of outputting NC part program for DNC operation or M198 operation to the CNC.
The application must call this function with the result indicating whether the output process of
NC part program is terminated normally or not.
In case that EW_RESET was returned by cnc_dnc2,
this function must be called with specifying DNC_CANCEL as the result.
This function is not available to Embedded Ethernet.
PROTOTYPE
FWLIBAPI short WINAPI cnc_dncend2(unsigned short FlibHndl, short result);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||
| result | in |
This function returns EW_DATA if other value is specified as the 'result'. |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
| EW_DATA |
The invalid value is specified as the 'result'. |
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_PARAM |
Following CNC parameter must be specified. Series 15/15i 7713#0 = 1 Series 16/18/21, 16i/18i/21i, 0i-A/B/C 8706#1 = 1 |
program\cnc_dncstart
It is possible to get CNC to run an NC program (NC command data), In case of Series 15, the parameter No.20 must be set to '15'. Start the data transferring by using the cnc_dnc function or the cnc_cdnc function after executing this function and checking that the "STL" signal(DO) is on.
which is made by the application program, directly (DNC operation).
The application program requests CNC to start DNC operation by this function.
Even if this setting is not done, this function does not return error.
In case of Series 16/18/21, 16i/18i/21i, 0i, Power Mate i, "DMMC" signal(DI) <G042#7>must be on.
Even if this setting is not done, this function does not return error.
PROTOTYPE
FWLIBAPI short WINAPI cnc_dncstart(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. |
ERRORS
| Code | Description |
|---|---|
| EW_BUSY |
|
| EW_PARAM |
The following CNC parameter must be set. Series 16/18, 16i/18i/21i, 0i 8706#1 = 0 |
program\cnc_dncstart2
This function returns whether DNC operation or M198 operation is being executed or not.
This function returns EW_OK in case that DNC operation or M198 operation are started.
If a return value is EW_OK at M198 operation, this function returns a program number/program name demanded from CNC, instead at DNC operation, NULL is returned for the program number/program name. This function returns EW_REJECT in case that DNC operation or M198 operation has not been started. The following functions will return EW_FUNC in case that cnc_dncstart2 function is not executed. A basic procedure for DNC operation or M198 operation is shown below.
Also, if a return value is EW_OK, it become possible to output the
program of DNC operation or M198 operation by a function cnc_dnc2
cnc_dnc2
cnc_dncend2
This function is not available to Embedded Ethernet.
PROTOTYPE
FWLIBAPI short WINAPI cnc_dncstart2(unsigned short FlibHndl, char *filename);
ARGUMENTS
| Name | Direction | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||
| filename | out |
The pointer of the area where the NC program number/program name will be set by CNC.
In order to get the program number for operation, at least 16 bytes area is required.
In order to get the program name for operation, at least 64 bytes area is required. Program number/program name is set as ASCII code with NULL terminated at this area.
The NULL string is set as the program number/program name in case of DNC operation, and the character string that shows the program number/program name in case of M198 operation. |
ERRORS
| Code | Description |
|---|---|
| EW_BUSY |
cnc_dncstart2 function has been executed. Terminate DNC operation by using cnc_dncend2 function. |
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_PARAM |
The following CNC parameter must be set. Series 15/15i 7713#0 = 1 Series 16/18, 16i/18i/21i, 0i-A/B/C 8706#1 = 1 |
| EW_REJECT |
|
program\cnc_download
Outputs NC program to be registered(downloading).
When the data processing on the CNC side is delayed and the data cannot be transferred,
this function waits until it can be transferred.
The procedure of downloading is as follows.
For transferring the data, there are 4 buffers of 256 bytes.
Because importance is attached to the speed of data transfer to the CNC,
in general, return of errors(EW_DATA, EW_OVRFLOW, etc.) may be delayed. NC program to be registered to CNC is a string composed of ASCII characters as the following format.
LF Oxxxx LF Block1 LF Block2 LF ... LF Mxx LF %
If an application cannot wait, use the cnc_cdownload function.
One buffer is used at each cnc_download calling without any relationto the data size.
Therefore, the maximum size which can be transferred by one calling is 256 bytes.
Namely, an error status may refrect the result caused by the previously executed
cnc_download callings.
And the error status for some cnc_download callings just before the finish of
downloading is returned by "End of downloading NC program".
where,
LF
0x0A ('\n': EOB)
Oxxxx
Program number
Mxx
M code at the end of the program(M02,M30,etc.)
'LF' must be placed at the top of the whole program, and '%' at the end.
Data before the first 'LF' are ignored.
Address 'O' and program number must be placed in the program to be registered.
For example, to register a program such as
O1234 ;
G1 F0.3 W10. ;
M30 ;
%
"\nO1234\nG1F0.3W10.\nM30\n%"
For above example, the program can be sent block by block like this.
"\n"
"O1234\n"
"G1F0.3W10.\n"
"M30\n"
"%"
PROTOTYPE
FWLIBAPI short WINAPI cnc_download(unsigned short FlibHndl,char *data, short number);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. |
| data | in |
Specify the top address of NC program data. |
| number | in |
Specify the number of characters of NC program data. (1 - 256) |
ERRORS
| Code | Description |
|---|---|
| EW_RESET |
CNC required to stop downloading. 'RESET or STOP' was pushed.(Series 15/15i) Call the cnc_dwnend function. |
| EW_FUNC |
|
| EW_LENGTH |
Length of data block(number) exceeds 256 bytes. |
| EW_DATA |
|
| EW_PROT |
Tape memory is write-protected by the CNC parameter setting(O8000-/O9000- protection, encoding). See Description about the timing of error. |
| EW_OVRFLOW |
CNC tape memory shorts for the registration. Make enough free area in CNC memory. See Description about the timing of error. |
program\cnc_download3
Output NC data to be registered (downloading).
This function outputs the characters of NC program as long as it is specified by '*length'.
Data is transferred using 256 bytes buffer.
To improve translation speed, the value of the '*length' should be a multiple of 256.
(In case of Ethernet connection, the size of 1460 bytes(maximun value) can be transmitted at a time. So, specify the size in 1024-1400 bytes for a value of *length. If the buffer size is a little size, transmission efficiency become to worsen, and the communication error might occur.)
In case that this function cannot output at least one character, it returns EW_BUFFER,
so again call this function with the same arguments.
Because importance is attached to the speed of data transfer to the CNC, in general,
return of errors(EW_DATA, EW_OVRFLOW, etc.) may be delayed. Namely, an error status
may refrect the result caused by the previously executed
cnc_download callings. NC data to be registered to CNC is a string composed of ASCII characters as the following format.
LF Block1 LF Block2 LF ... LF %
'LF' must be placed at the top of the whole program, and '%' at the end.
In case of NC program, address 'O' and program number must be placed in the program to be registered. send a following string using cnc_download3 function.
However, if there is no room to store the specified number of character, this function stores
the characters as many as possible to fill the buffer and then sets '*length' with the
real number of characters which are stored in the buffer.
And the error status for some cnc_download
callings just before the finish of downloading is returned by
cnc_dwnend3 function.
NC data format
where LF = 0x0A ('\n')
Data before the first 'LF'are ignored.
For example, to register a program such as
O1234 ;
G1 F0.3 W10. ;
M30 ;
%
"\nO1234\nG1F0.3W10.\nM30\n%"
PROTOTYPE
FWLIBAPI short WINAPI cnc_download3(unsigned short FlibHndl, long *length, char *data);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| length | in/out |
Specify the ponter of the variable to the character length of NC data. This function returns EW_LENGTH if '*length' has the value of zero or negative. |
| data | in |
Specify the ponter of the variable to NC data. |
ERRORS
| Code | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_RESET |
CNC required to stop downloading. Call the cnc_dwnend3 function. |
|||||||||||||||
| EW_FUNC |
|
|||||||||||||||
| EW_LENGTH |
|
|||||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
|||||||||||||||
| EW_PROT |
Tape memory is write-protected by the CNC parameter setting(O8000-/O9000- protection, encoding). See Description about the timing of error. |
|||||||||||||||
| EW_OVRFLOW |
CNC tape memory shorts for the registration. Make enough free area in CNC memory. See Description about the timing of error. |
|||||||||||||||
| EW_BUFFER |
Retry because the buffer is full. See Description about the timing of error. |
|||||||||||||||
| EW_REJECT |
Downloading is disable in the current CNC status. (Machining, resetting, mode changing) See Description about the timing of error. |
|||||||||||||||
| EW_ALARM |
Alarm has occurred while downloading. See Description about the timing of error. |
program\cnc_download4
Output NC data to be registered (downloading).
This function outputs the characters of NC program as long as it is specified by '*length'.
(In case of Ethernet connection, the size of 1460 bytes(maximun value) can be transmitted at a time. So, specify the size in 1024-1400 bytes for a value of *length. If the buffer size is a little size, transmission efficiency become to worsen, and the communication error might occur.)
In case that this function cannot output at least one character, it returns EW_BUFFER,
so again call this function with the same arguments.
Because importance is attached to the speed of data transfer to the CNC, in general,
return of errors(EW_DATA, EW_OVRFLOW, etc.) may be delayed. Namely, an error status
may refrect the result caused by the previously executed cnc_download4 callings. NC data to be registered to CNC is a string composed of ASCII characters as the following format.
LF Block1 LF Block2 LF ... LF %
'LF' must be placed at the top of the whole program, and '%' at the end.
In case of NC program, address 'O' and program number must be placed in the program to be registered. send a following string using cnc_download4 function.
However, if there is no room to store the specified number of character, this function stores
the characters as many as possible to fill the buffer and then sets '*length' with the
real number of characters which are stored in the buffer.
And the error status for some cnc_download4
callings just before the finish of downloading is returned by
cnc_dwnend4 function.
NC data format
where LF = 0x0A ('\n')
Data before the first 'LF'are ignored.
For example, to register a program such as
O1234 ;
G1 F0.3 W10. ;
M30 ;
%
"\nO1234\nG1F0.3W10.\nM30\n%"
PROTOTYPE
FWLIBAPI short WINAPI cnc_download4(unsigned short FlibHndl, long *length, char *data);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| length | in/out |
Specify the ponter of the variable to the character length of NC data. This function returns EW_LENGTH if '*length' has the value of zero or negative. |
| data | in |
Specify the ponter of the variable to NC data. |
ERRORS
| Code | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_RESET |
CNC required to stop downloading. Call the cnc_dwnend4 function. |
|||||||||||||||
| EW_FUNC |
|
|||||||||||||||
| EW_LENGTH |
|
|||||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
|||||||||||||||
| EW_PROT |
Tape memory is write-protected by the CNC parameter setting(O8000-/O9000- protection, encoding). See Description about the timing of error. |
|||||||||||||||
| EW_OVRFLOW |
CNC tape memory shorts for the registration. Make enough free area in CNC memory. See Description about the timing of error. |
|||||||||||||||
| EW_BUFFER |
Retry because the buffer is full. See Description about the timing of error. |
|||||||||||||||
| EW_REJECT |
Downloading is disable in the current CNC status. (Machining, resetting, mode changing) See Description about the timing of error. |
|||||||||||||||
| EW_ALARM |
Alarm has occurred while downloading. See Description about the timing of error. |
program\cnc_dwnend
Notifies the end of downloading NC program to CNC.
There are cases where errors(EW_DATA,EW_OVRFLOW, etc.) during execution
of downloading NC program are returned by this function.
(This function must be executed after cnc_download /
cnc_cdownload.)
Further, this function does not return until the registration
of the output data by cnc_download(cnc_cdownload) is completed.
PROTOTYPE
FWLIBAPI short WINAPI cnc_dwnend(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
| EW_DATA |
|
| EW_PROT |
Tape memory is write-protected by the CNC parameter setting(O8000-/O9000- protection, encoding). See Description about the timing of error. |
| EW_OVRFLOW |
CNC tape memory shorts for the registration. Make enough free area in CNC memory. See Description about the timing of error. |
program\cnc_dwnend3
Notifies the end of downloading NC data to CNC.
There are cases where errors(EW_DATA,EW_OVRFLOW, etc.) during execution of downloading NC
program are returned by this function.
Further, this function does not return until the registration of the
output data by cnc_download3 is completed.
(This function must be executed after cnc_download3.)
PROTOTYPE
FWLIBAPI short WINAPI cnc_dwnend3(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
ERRORS
| Code | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_FUNC |
|
|||||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
|||||||||||||||
| EW_PROT |
Tape memory is write-protected by the CNC parameter setting(O8000-/O9000- protection, encoding). See Description about the timing of error. |
|||||||||||||||
| EW_OVRFLOW |
CNC tape memory shorts for the registration. Make enough free area in CNC memory. See Description about the timing of error. |
|||||||||||||||
| EW_REJECT |
Downloading is disable in the current CNC status. (Machining, resetting, mode changing) See Description about the timing of error. |
|||||||||||||||
| EW_ALARM |
Alarm has occurred while downloading. See Description about the timing of error. |
program\cnc_dwnend4
Notifies the end of downloading NC data to CNC.
There are cases where errors(EW_DATA,EW_OVRFLOW, etc.) during execution of downloading NC
program are returned by this function.
Further, this function does not return until the registration of the
output data by cnc_download4 is completed.
(This function must be executed after cnc_download4.)
PROTOTYPE
FWLIBAPI short WINAPI cnc_dwnend4(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
ERRORS
| Code | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_FUNC |
|
|||||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
|||||||||||||||
| EW_PROT |
Tape memory is write-protected by the CNC parameter setting(O8000-/O9000- protection, encoding). See Description about the timing of error. |
|||||||||||||||
| EW_OVRFLOW |
CNC tape memory shorts for the registration. Make enough free area in CNC memory. See Description about the timing of error. |
|||||||||||||||
| EW_REJECT |
Downloading is disable in the current CNC status. (Machining, resetting, mode changing) See Description about the timing of error. |
|||||||||||||||
| EW_ALARM |
Alarm has occurred while downloading. See Description about the timing of error. |
program\cnc_dwnstart
Requests CNC to start downloading NC program.
(This function must be executed before cnc_download /
cnc_cdownload.)
In the case of Series 15/15i, when the CNC side is in background editprocessing,
this function waits the termination of background edit.
PROTOTYPE
FWLIBAPI short WINAPI cnc_dwnstart(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. |
ERRORS
| Code | Description |
|---|---|
| EW_BUSY |
Series15/15i
|
| EW_FUNC |
|
| EW_PROT |
|
program\cnc_dwnstart3
Notifies the start of uploading NC data (NC program, tool offset, etc.) to the internal logic of the
Data window library.
cnc_download3 function and
cnc_dwnend3 function will return
EW_FUNC in case that cnc_dwnstart3 function is not executed.
A basic procedure for download is shown below.
(This function must be executed before cnc_download3.)
PROTOTYPE
FWLIBAPI short WINAPI cnc_dwnstart3(unsigned short FlibHndl, short type);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||
| type | in |
|
ERRORS
| Code | Description |
|---|---|
| EW_BUSY |
Series 15i
|
| EW_ATTRIB |
Data type (type) is illegal. |
| EW_NOOPT |
Series 15i
|
| EW_PARAM |
Series 15i
|
| EW_MODE |
Series 15i (in case of except NC program)
|
| EW_REJECT |
|
| EW_ALARM |
|
| EW_PASSWD |
(Series 16/18/21, 16i/18i/21i, 0i-A/B/C) |
program\cnc_dwnstart4
Notifies the start of uploading NC data (NC program, tool offset, etc.) to the internal logic of the
Data window library.
In case of download for NC programs, a destination folder can be specified.
cnc_download4 function and
cnc_dwnend4 function will return
EW_FUNC in case that cnc_dwnstart4 function is not executed.
A basic procedure for download is shown below.
(This function must be executed before cnc_download4.)
PROTOTYPE
FWLIBAPI short WINAPI cnc_dwnstart4(unsigned short FlibHndl,short type, char* dir_name);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||
| type | in |
Specify the kinf of the data.
|
|||||||||||||||||||||
| dir_name | in |
Specify a destination folder name for download. (The maximum length of the character string is 241 and the string should be included by NULL('\0') terminate character.) Example : "//CNC_MEM/USER/PATH1/"It is available when type = 0. Please refer to "General Description (Specifying the folder and file name for FS30i, 0i-D/F and PMi-A.)" for details of the folder name. |
ERRORS
| Code | Description | |||
|---|---|---|---|---|
| EW_BUSY |
|
|||
| EW_ATTRIB |
Data type (type) is illegal. |
|||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
|||
| EW_NOOPT |
In case of custom macro variables or pitch error compensation data, this function needs the option for the target data. |
|||
| EW_PARAM |
In case of parameter, set 'parameter write enable' state by setting screen. |
|||
| EW_REJECT |
|
|||
| EW_ALARM |
|
program\cnc_exeprgname
Reads full path name of the program which is being currently executed in CNC.
When the CNC is stopping, the name of the executed program is acquired.
The program name is stored in "execprg.name" with maximum 32 character string format.
exeprg.name
:
'O' and the number are stored with ASCII code, for example, "O123".
exeprg.o_num
:
The O number are stored with binary format, for example, 123.
exeprg.name
:
The program name is stored with ASCII code, for example, "ABC".
exeprg.o_num
:
0 is stored with binary format.
PROTOTYPE
FWLIBAPI short WINAPI cnc_exeprgname(unsigned short FlibHndl, ODBEXEPRG *exeprg);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| exeprg | out |
Pointer to the ODBEXEPRG structure including the program name being executed.
typedef struct odbexeprg {
char name[36] ; /* the program name being executed */
long o_num ; /* the program number being executed */
} ODBEXEPRG ;
|
ERRORS
| Code | Description |
|---|
program\cnc_exeprgname2
Reads full path name of the program which is being currently executed in CNC. When the CNC mode is MDI, "O0" is acquired.
When the CNC is stopping, the name of the executed program is acquired.
The program name is stored in "path_name" with maximum 256 character string format.
path_name
:
'O' number is stored with ASCII code, for example, "//CNC_MEM/USER/PATH1/O123".
path_name
:
The program name is stored with ASCII code, for example, "//CNC_MEM/USER/PATH1/ABC".
PROTOTYPE
FWLIBAPI short WINAPI cnc_exeprgname2(unsigned short FlibHndl, char *path_name);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| path_name | out |
Specify the pointer to store the full path name of the program which is being currently selected in CNC. |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
program\cnc_mergeprog
This function inserts another program(dst_prog) in specified program(src_prog). The insertion position can select a specified line or the last line. This function cannot be used to MDI program.
The program which becomes the CNC mode and an object which can be specified for the insertion destination is as follows.
O : Available / × : Not available
EDIT mode
MDI mode
Other mode
MDI program
×(*1)
×(*1)
×(*1)
Selected program
O
×(*2)
×(*2)
Not selected program
O
O
O
(*1) The return code is EW_DATA(Detail status is 1).
(*2) The return code is EW_MODE.
The program which becomes the CNC mode and an object which can be specified for the insertion source is as follows.
| EDIT mode | MDI mode | Other mode | |
| MDI program | ×(*1) | ×(*1) | ×(*1) |
| Selected program | O | O | O |
| Not selected program | O | O | O |
(*1) The return code is EW_DATA(Detail status is 3).
The program from the next data of program number to the previous data of EOR is inserted.
The program is inserted from the top of specified line. When the last line is specified, the program is inserted just before EOR.
PROTOTYPE
FWLIBAPI short WINAPI cnc_mergeprog(unsigned short FlibHndl, short type, long src_prog, unsigned long line_no, long dst_prog);
ARGUMENTS
| Name | Direction | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||
| type | in |
Specify the insert position of program.
|
||||||||
| src_prog | in |
Specify the program number of insertion destination. |
||||||||
| line_no | in |
Specify the line number by which the program is inserted. (1-) |
||||||||
| dst_prog | in |
Specify the program number of insertion source. |
ERRORS
| Code | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_BUSY |
- Background edit processing in CNC side - MDI mode on CNC side |
|||||||||||||||
| EW_ATTRIB |
Insert position(type) is wrong. |
|||||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
|||||||||||||||
| EW_NOOPT |
The extended driver/library function is necessary. |
|||||||||||||||
| EW_PROT |
CNC parameter is a state of write-protection (O8000-/O9000- protection, encoding). |
|||||||||||||||
| EW_OVERFLOW |
It is lack of free area in CNC memory. Make enough free area in CNC memory. |
|||||||||||||||
| EW_MODE |
|
|||||||||||||||
| EW_REJECT |
- Program of the insertion destination is running. - Some alarm in CNC. |
program\cnc_pdf_add
Creates the folder or file under the specified folder.
Execution of this function is kept waiting when CNC is in editing(including the background edit state).
The file having the same number or name against the current existing file cannot be created.
The folder having the same name against the current existing folder cannot be created.
And when the attribute of the folder is prohibited from writing, new folder/file cannot be created.
When the making of file is executed on EDIT mode, the making file is automatically selected as the main program.
PROTOTYPE
FWLIBAPI short WINAPI cnc_pdf_add(unsigned short FlibHndl, char *file_path);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| file_path | in |
Specify the pointer for the string that stores "Current drive + folder + file name". |
ERRORS
| Code | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
||||||||||||||||||||||||
| EW_PROT |
Specified file/folder is prohibited from writing. |
||||||||||||||||||||||||
| EW_OVRFLOW |
Program registration area is full. |
||||||||||||||||||||||||
| EW_REJECT |
CNC is on execution. |
program\cnc_pdf_cond
Rearranges the contents of the program.
In other words, this function condenses the program.
When the specified file is used for NC operation or selected at foreground, the file cannot be condensed.
And in case of the protected file, the file cannot be condensed.
When the file name is not specified, all files in the current folder are condensed.
Execution of this function is kept waiting when CNC is in editing(including the background edit state).
PROTOTYPE
FWLIBAPI short WINAPI cnc_pdf_cond(unsigned short FlibHndl, char *file_path);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| file_path | in |
Specify the pointer for the string that stores "Current drive + folder + file name". |
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
|||||||||
| EW_PROT |
Specified file/folder is prohibited from writing. |
|||||||||
| EW_REJECT |
CNC is on execution. |
program\cnc_pdf_copy
Copies the specified program. The program name is specified according to the following format. The copy between different devices is also possible. The device which can be specified is as follows.
The copy process cannot be executed at the following conditions:
//Drive Name/Filder Name../Program Name
Device
Device name
CNC Memory
CNC_MEM
Memory Card
MEM_CARD
Data Server
DATA_SV
The copy of the directory cannot be done.
PROTOTYPE
FWLIBAPI short WINAPI cnc_pdf_copy(unsigned short FlibHndl, char *file_path, char *copy_path);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| file_path | in |
Specify the pointer for the string that stores the source program path
in "drive + directory + file name" format. |
| copy_path | in |
Specify the pointer for the string that stores the target program path
in "drive + directory + file name" format. |
ERRORS
| Code | Description | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
|||||||||||||||||||||
| EW_PROT |
Specified file is prohibited from writing. Specified directory has the write protedted setting. Specified program is locked by cnc_setpdf_pglock. Writing to the device is prohibited by setting the parameter etc.. |
|||||||||||||||||||||
| EW_OVRFLOW |
Program registration area is full. |
|||||||||||||||||||||
| EW_MODE |
|
|||||||||||||||||||||
| EW_REJECT |
CNC is on execution. |
program\cnc_pdf_del
Deletes the folder or file under the specified folder.
Execution of this function is kept waiting when CNC is in editing including the background edit state).
When the specified file is used for NC operation or selected at foreground, the file cannot be deleted.
And in case of the protected file, the file cannot be deleted.
When the specified folder is selected as the current folder, the folder cannot be deleted.
And in case that the folder is not vacant, the folder cannot be deleted.
PROTOTYPE
FWLIBAPI short WINAPI cnc_pdf_del(unsigned short FlibHndl, char *file_path);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| file_path | in |
Specify the pointer for the string that stores "Current drive + folder + file name". |
ERRORS
| Code | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
||||||||||||
| EW_PROT |
Specified file/folder is prohibited from writing. |
||||||||||||
| EW_REJECT |
- CNC is on execution. - CNC is in the emergency stop. |
program\cnc_pdf_delall
All programs in the specified folder are deleted.
In the following cases, the program is not deleted.
-
Protected programs.
-
Background editing program.
-
Downloading, verifying.
-
Running program.
-
Main program in except EDIT mode.
PROTOTYPE
FWLIBAPI short WINAPI cnc_pdf_delall(unsigned short FlibHndl, unsigned short type, char *path);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| type | in |
Specify "0". |
| path | in |
Specify the pointer for the string that stores "drive + folder name". |
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
program\cnc_pdf_delline
Deletes the NC program by line basis. When you specify the line including a program file name(ex."Oxxxx" or "<xxxx>"), this function deletes the character after a file name, but doesn't delete a file name.
The conditions of the function about CNC mode and the kind of program are as follows.
Example)
You have the following program you are going to delete by line basis.
O1234(TEST PROGRAM) ;
G01 X0. F100 ;
X20. ;
M30 ;
%
When you delete 3 lines from the line number 0 for the above program, then you get the following result.
O1234 M30 ;
%
O: Available / ×: Not available (The return code is EW_MODE)
EDIT mode
MDI mode
Other mode
MDI program
×
O
×
Selected program
O
×
×
Not selected program
O
O
O
If you have the playback option, TJOG/THND mode is the same as EDIT.
This function works normally if OP signal is 1 but STL signal is 0 (for example, feed hold stopping, single block stopping, etc).
When you use this function for the MDI program or the selected program in the following situations, the execution pointer goes to the top of line specified by line_no.
- MDI program in MDI mode.
- Selected program in EDIT mode.
- Selected program in TJOG/THND mode with the playback option.
When the reset processing is executed in CNC, the processing interrupts can be selected according to the parameter LES(No.11353#3).
Inc case of parameter LES(No.11353#3)=0 : The process is not interrupted.
Inc case of parameter LES(No.11353#3)=1 : The process is interrupted.
PROTOTYPE
FWLIBAPI short WINAPI cnc_pdf_delline(unsigned short FlibHndl, char *prog_name, unsigned long line_no, unsigned long line_len);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| prog_name | in |
Program path makes of the "drive name","path name" and "file name". |
| line_no | in |
Specify the line number to delete. |
| line_len | in |
Specify the line number to delete. |
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_BUSY |
CNC is searching the program text right now. |
|||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
|||||||||
| EW_NOOPT |
The extended driver/library function is necessary. |
|||||||||
| EW_PROT |
CNC parameter is a state of write-protection (O8000-/O9000- protection, encoding). |
|||||||||
| EW_MODE |
|
|||||||||
| EW_REJECT |
- CNC is in the emergency stop. |
program\cnc_pdf_move
Moves the specified program.
The move process cannot be executed at the following conditions:
The directory cannot be moved.
PROTOTYPE
FWLIBAPI short WINAPI cnc_pdf_move(unsigned short FlibHndl, char *file_path, char *move_path);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| file_path | in |
Specify the pointer for the string that stores the source program path in "drive + directory + file name" format. |
| move_path | in |
Specify the pointer for the string that stores the target program path in "drive + directory + file name" format. |
ERRORS
| Code | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
||||||||||||||||||||||||
| EW_PROT |
Specified file is prohibited from writing. Specified directory has the write protedted setting. Specified program is locked by cnc_setpdf_pglock. |
||||||||||||||||||||||||
| EW_OVRFLOW |
Program registration area is full. |
||||||||||||||||||||||||
| EW_MODE |
|
||||||||||||||||||||||||
| EW_REJECT |
CNC is on execution. |
program\cnc_pdf_rdactpt
Get the actual execution pointer in MDI, MEM and EDIT, TJOG, THND mode. The restrictions are as follows.
When the reset processing is executed in CNC, the processing interrupts can be selected according to the parameter LES(No.11353#3).
Inc case of parameter LES(No.11353#3)=0 : The process is not interrupted.
Inc case of parameter LES(No.11353#3)=1 : The process is interrupted.
In case of 0i-D, when this function is executed just behind the function(Ex.:cnc_pdf_searchresult) to which the block number is changed, the previous value might be acquired.
PROTOTYPE
FWLIBAPI short WINAPI cnc_pdf_rdactpt(unsigned short FlibHndl, char* prog_name, long* blk_no );
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| prog_name | out |
Pointer to the variable to store the actual executed program into. |
| blk_no | out |
Pointer to the variable to store the actual executed program pointer into. |
ERRORS
| Code | Description |
|---|---|
| EW_MODE |
CNC mode is except MDI, MEM, EDIT, TJOG and THND one. |
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_REJECT |
|
program\cnc_pdf_rdmain
Reads the file information that is select currently as the main program.
PROTOTYPE
FWLIBAPI short WINAPI cnc_pdf_rdmain(unsigned short FlibHndl, char *file_path);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| file_path | out |
Specify the pointer for the string that stores "Current drive + folder + file name". |
ERRORS
| Code | Description |
|---|---|
| EW_REJECT |
|
program\cnc_pdf_rename
Renames the folder or file under the specified folder.
Execution of this function is kept waiting when CNC is in editing (including the background edit state).
When the specified file is used for NC operation or selected at foreground,
the file cannot be renamed. And in case of the protected file, the file cannot be renamed.
When the specified folder is selected as the current folder or the upper folder
that includes the current folder, the folder cannot be renamed.
PROTOTYPE
FWLIBAPI short WINAPI cnc_pdf_rename(unsigned short FlibHndl, char *file_path, char *d_d_f) ;
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| file_path | in |
Specify the pointer for the string that stores "Current drive + folder + file name". |
| d_d_f | in |
Specify the pointer for the string that stores the folder/file name to be renamed. |
ERRORS
| Code | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
|||||||||||||||
| EW_PROT |
Specified file/folder is prohibited from writing. |
|||||||||||||||
| EW_REJECT |
- CNC is on execution. - CNC is in the emergency stop. |
program\cnc_pdf_searchresult
Gets the result of cnc_pdf_searchword function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_pdf_searchresult(unsigned short FlibHndl, unsigned long *search_no );
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| serach_no | out |
Specify the pointer to the buffer holding the target string to search and line number to set. |
ERRORS
| Code | Description |
|---|---|
| EW_BUSY |
CNC is searching the program text right now. |
| EW_FUNC |
|
| EW_DATA |
Specified string cannot be found. |
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_NUMBER |
|
program\cnc_pdf_searchword
Searches the string within the NC program. The basic order to search is as follows.
The conditions of the function about CNC mode and the kind of programare as follows.
O: Available / ×: Not available (The return code is EW_MODE)
EDIT mode
MDI mode
Other mode
MDI program
×
O
×
Selected program
O
×
×
Not selected program
O
O
O
This function works normally if OP signal is 1 but STL signal is 0 (for example, feed hold stopping, single block stopping, etc).
The return value of this function and the position of the execution pointer change as follows by the existence of the playback option.
Upper : With the playback option
Lower : Withouit the playback option
1) Search of the word in selected program (main program).
| Mode | MEM | MEM | EDIT | EDIT | MDI | JOG/HNDL | Others |
|---|---|---|---|---|---|---|---|
| Operation status | Auto run (OP=1,STL=1) |
Stop/Halt (OP=1,STL=0) |
Stop/Halt (OP=1,STL=0) |
Idle mode (OP=0,STL=0) |
Idle mode (OP=0,STL=0) |
Idle mode (OP=0,STL=0) |
Idle mode (OP=0,STL=0) |
| Return value of cnc_pdf_searchword | EW_REJECT | EW_OK | EW_OK | EW_OK | EW_OK | EW_OK | EW_REJECT |
| EW_MODE | EW_MODE | EW_MODE | EW_MODE | ||||
| Pointer movement of selected program | None | Moves | Moves | Moves | Moves(*1) | Moves | None |
| None | None(*1) | None | |||||
| Pointer movement in the executing screen | None | Moves | Moves | Moves | Moves(*1) | Moves | None |
| None | None(*1) | None |
2) Search of the word in unselected program (not main program).
| Mode | MEM | MEM | EDIT | EDIT | MDI | JOG/HNDL | Others |
|---|---|---|---|---|---|---|---|
| Operation status | Auto run (OP=1,STL=1) |
Stop/Halt (OP=1,STL=0) |
Stop/Halt (OP=1,STL=0) |
Idle mode (OP=0,STL=0) |
Idle mode (OP=0,STL=0) |
Idle mode (OP=0,STL=0) |
Idle mode (OP=0,STL=0) |
| Return value of cnc_pdf_searchword | EW_OK | EW_OK | EW_OK | EW_OK | EW_OK | EW_OK | EW_OK |
| Pointer movement of selected program | None | None | None | None | None | None | None |
| Pointer movement in the executing screen | None | None | None | None | None | None | None |
3) Search of the word in MDI program.
| Mode | MDI | MDI | MDI | Others |
|---|---|---|---|---|
| Operation status | Auto run (OP=1,STL=1) |
Stop/Halt (OP=1,STL=0) |
Idle mode (OP=0,STL=0) |
Idle mode (OP=0,STL=0) |
| Return value of cnc_pdf_searchword | EW_REJECT | EW_OK | EW_OK | EW_MODE |
| Pointer movement of selected program | None | None(*2) | Moves | None |
| Moves | ||||
| Pointer movement in the executing screen | None | Moves | Moves | None |
| None(*3) |
(*3) In the executing screen though it doesn't move, running is restarted from the block where the searched word exists.
4) MEM running:Search of the word in main program during subprogram call(M98).
| Mode | MEM | MEM | EDIT |
|---|---|---|---|
| Operation status | Auto run (OP=1,STL=1) |
Stop/Halt (OP=1,STL=0) |
Stop/Halt (OP=1,STL=0) |
| Return value of cnc_pdf_searchword | EW_OK | EW_OK | EW_OK |
| Pointer movement of Main program (Execution position at returning from subprogram) |
None | None | None |
5) MEM running:Search of the word in main program during macro program call(G65).
| Mode | MEM | MEM | EDIT |
|---|---|---|---|
| Operation status | Auto run (OP=1,STL=1) |
Stop/Halt (OP=1,STL=0) |
Stop/Halt (OP=1,STL=0) |
| Return value of cnc_pdf_searchword | EW_OK | EW_OK | EW_OK |
| Pointer movement of Main program (Execution position at returning from macro program) |
None | None | None |
6) MEM running:Search of the word in main program during external subprogram call(M198).
| Mode | MEM | MEM | EDIT |
|---|---|---|---|
| Operation status | Auto run (OP=1,STL=1) |
Stop/Halt (OP=1,STL=0) |
Stop/Halt (OP=1,STL=0) |
| Return value of cnc_pdf_searchword | EW_OK | EW_OK | EW_OK |
| EW_MODE | |||
| Pointer movement of Main program (Execution position at returning from external subprogram) |
None | Moves(*4) | Moves(*4) |
| None |
7) MEM running:Search of the word in subprogram during subprogram call(M98).
| Mode | MEM | MEM | EDIT |
|---|---|---|---|
| Operation status | Auto run (OP=1,STL=1) |
Stop/Halt (OP=1,STL=0) |
Stop/Halt (OP=1,STL=0) |
| Return value of cnc_pdf_searchword | EW_REJECT | EW_OK | EW_OK |
| EW_MODE | |||
| Pointer movement of Sub program | None | Moves | Moves |
| None |
8) MEM running:Search of the word in macro program during macro program call(G65).
| Mode | MEM | MEM | EDIT |
|---|---|---|---|
| Operation status | Auto run (OP=1,STL=1) |
Stop/Halt (OP=1,STL=0) |
Stop/Halt (OP=1,STL=0) |
| Return value of cnc_pdf_searchword | EW_REJECT | EW_OK | EW_OK |
| EW_MODE | |||
| Pointer movement of Macro program | None | Moves | Moves |
| None |
9) MDI running:Search of the word in MDI program during subprogram call(M98).
| Mode | MDI | MDI |
|---|---|---|
| Operation status | Auto run (OP=1,STL=1) |
Stop/Halt (OP=1,STL=0) |
| Return value of cnc_pdf_searchword | EW_REJECT | EW_DATA(*5) |
| Pointer movement of MDI program | None | Moves(*6) |
(*6) It moves to the end block of the program of MDI.
10) MDI running:Search of the word in MDI program during macro program call(G65).
| Mode | MDI | MDI |
|---|---|---|
| Operation status | Auto run (OP=1,STL=1) |
Stop/Halt (OP=1,STL=0) |
| Return value of cnc_pdf_searchword | EW_REJECT | EW_DATA(*7) |
| Pointer movement of MDI program | None | Moves(*8) |
(*8) It moves to the end block of the program of MDI.
11) MDI running:Search of the word in MDI program during external subprogram call(M198).
| Mode | MDI | MDI |
|---|---|---|
| Operation status | Auto run (OP=1,STL=1) |
Stop/Halt (OP=1,STL=0) |
| Return value of cnc_pdf_searchword | EW_REJECT | EW_OK |
| Pointer movement of MDI program | None | Moves(*9) |
12) MDI running:Search of the word in sub program during subprogram call(M98).
| Mode | MDI | MDI |
|---|---|---|
| Operation status | Auto run (OP=1,STL=1) |
Stop/Halt (OP=1,STL=0) |
| Return value of cnc_pdf_searchword | EW_REJECT | EW_OK |
| Pointer movement of MDI program | None | None |
13) MDI running:Search of the word in macro program during macro program call(G65).
| Mode | MDI | MDI |
|---|---|---|
| Operation status | Auto run (OP=1,STL=1) |
Stop/Halt (OP=1,STL=0) |
| Return value of cnc_pdf_searchword | EW_REJECT | EW_OK |
| Pointer movement of MDI program | None | None |
PROTOTYPE
FWLIBAPI short WINAPI cnc_pdf_searchword(unsigned short FlibHndl, char *prog_name, unsigned long line_no,
unsigned long search_type,unsigned long search_direct, unsigned long repeat, char* buffer );
ARGUMENTS
| Name | Direction | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||
| prog_name | in |
Program path makes of the "drive name","path name" and "file name". |
|||||||||
| line_no | in |
Specify the line number to search from. |
|||||||||
| type | in |
Specify the type of the search operation.
When you commands "Character search", you have to set the only one address character as the target string. If you set except the address character or more than two characters, this function returns EW_DATA error. When you commands "Word search" for the only one address character, you have no error and the address character is going to be searched. When you commands "Last line search", this function ignores the parameters direct, repeat and prog_data. |
|||||||||
| direct | in |
Specify the direction to search.
|
|||||||||
| repeat | in |
Specify the limitation of times the string is found when there are many strings matching within the program. |
|||||||||
| prog_data | in |
Specify the pointer to the buffer holding the target string to search. The first character of the string must be an address character (G, F, etc).
|
ERRORS
| Code | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_BUSY |
CNC is searching the program text right now. |
||||||||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
||||||||||||||||||
| EW_NOOPT |
The extended driver/library function is necessary. |
||||||||||||||||||
| EW_PROT |
CNC parameter is a state of write-protection(O8000-/O9000- protection, encoding). |
||||||||||||||||||
| EW_MODE |
|
||||||||||||||||||
| EW_REJECT |
- CNC is in the emergency stop. |
program\cnc_pdf_slctmain
Selects the file under the specified folder as the main program.
Execution of this function is kept waiting when CNC is in editing (including the background edit state).
PROTOTYPE
FWLIBAPI short WINAPI cnc_pdf_slctmain(unsigned short FlibHndl, char *file_path) ;
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| file_path | in |
Specify the pointer for the string that stores "Current drive + folder + file name". |
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerrfunction. The following detail status will be set onto the member, err_no of ODBERR structure.
|
||||||
| EW_MODE |
|
program\cnc_pdf_wractpt
Sets the execution pointer of the NC program for the MDI or Memory operation. If there are some blocks that CNC has already read, these blocks will be executed before the block specified by this function. When the reset processing is executed in CNC, the processing interrupts can be selected according to the parameter LES(No.11353#3). Inc case of parameter LES(No.11353#3)=0 : The process is not interrupted. Inc case of parameter LES(No.11353#3)=1 : The process is interrupted.
PROTOTYPE
FWLIBAPI short WINAPI cnc_pdf_wractpt(unsigned short FlibHndl, char *prog_name, short type, long *blk_no );
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||
| prog_name | in |
Program name |
|||||||||||||||||||||||||||
| type | in |
Type of the execution pointer you will set.
|
|||||||||||||||||||||||||||
| blk_no | in/out |
Pointer to the long type variable holding the block number to set.
|
ERRORS
| Code | Description |
|---|---|
| EW_ATTRIB |
type is illegal. |
| EW_DATA |
|
| EW_MODE |
|
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_REJECT |
|
program\cnc_rdactpt
Get the actual execution pointer in MDI, MEM and EDIT, TJOG, THND mode. When this function works in DNC/M198 and RISC operation, the return code is EW_REJECT. The restrictions in FS30i, FS0i-D/F and PMi-A are as follows.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdactpt(unsigned short FlibHndl, long *prog_no, long *blk_no);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| prog_no | out |
Pointer to the variable to store the actual executed program number into. |
| blk_no | out |
Pointer to the variable to store the actual executed program pointer into. |
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_MODE |
CNC mode is except MDI, MEM, EDIT, TJOG and THND one. |
| EW_REJECT |
|
program\cnc_rdblkcount
Reads the value of block counter.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdblkcount(unsigned short FlibHndl, long *prog_bc);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. |
| prog_bc | out |
Specify the address of the variable where the block counter is stored. |
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The program restarting function and the extended driver/library function are necessary. |
program\cnc_rddncdgndt
Diagnosis data regarding the output of downloading DNC program is returned.
The purpose of this function is the maintenance of DNC operation or 198 operation.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rddncdgndt(unsigned short FlibHndl, ODBDNCDGN *dgndt);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| dgndt | out |
The pointer to a structure 'ODBDNCDGN' that returns diagnosis data.
typedef struct odbdncdgn {
short ctrl_word;
short can_word;
char nc_file[16];
unsigned short read_ptr;
unsigned short write_ptr;
unsigned short empty_cnt;
unsigned long total_size;
} ODBDNCDGN;
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_PARAM |
Following CNC parameter must be set. Series 15/15i 7713#0 = 1 Series 16/18/21, 16i/18i/21i, 0i-A/B/C 8706#1 = 1 |
program\cnc_rdexecprog
Reads the contents of NC program being executed on CNC. In case of 15, 0i-F, 30i and PMi-A, the acquired character string is a analyzed character string. If you want the acquisition of the analyzed character string on the FS0i-D, set parameter No.13104#2=1. Note) In 16/18/21, 0i, Power Mate i, and 15, 30i, PMi-A the single block operation is different as follows.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdexecprog(unsigned short FlibHndl, unsigned short *length, short *blknum, char *data);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| length | in/out |
Specify the address of the variable which shows the number of characters to be read. |
| blknum | out |
Specify the address of the variable to store the number of blocks read in advance. |
| data | out |
Specify the top address of the string to store with the executing NC program. |
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Length of the block (length) is illegal. |
| EW_NOOPT |
The extended driver/library function is necessary. |
program\cnc_rdexecpt
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdexecpt(unsigned short FlibHndl, PRGPNT *pact, PRGPNT *pnext);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| pact | out |
Specify the pointer to the PRGPNT structure to store the execution pointer. The PRGPNT structure is as follows.
typedef struct _prgpnt {
long prog_no;
long blk_no;
} PRGPNT;
|
| pnext | out |
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_MODE |
CNC mode is except MDI, MEM, EDIT, TJOG and THND one. |
| EW_REJECT |
|
program\cnc_rdmdipntr
Reads the execution pointer information for MDI operating program.
In Series 15/15i, it is invalid except 'preread block pointer'. (0 can be read at any time)
In Series 16/18, 16i/18i, 30i, Power Mate i, it is possible to use this function for
the program number 8 digits, however it is necessary to switch API to
the one for the program number 8 digits.
The content which can be acquired is the following items.
When executing program is sub-program, the sub-program number is returned.
For MDI operating, it is basically 0, and for reading sub-program in advance,
it is the number of sub-program.
In Series 16i/18i-W, 'preread program number' and 'preread block pointer' are invalid.
In Series 30i, 0i-D/F and PMi-A 'program number being executed' and 'execution block pointer' are invalid.
See Program number 8 digits for details.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdmdipntr(unsigned short FlibHndl, ODBMDIP *mdip);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| mdip | out |
Pointer to the ODBMDIP structure including the execution pointer information.
For program number 4 digits,
typedef struct odbmdip {
short mdiprog; /* Program number being executed. */
long mdipntr; /* Execution block pointer. */
short crntprog; /* Preread program number. */
long crntpntr; /* Preread block pointer. */
} ODBMDIP ;
For program number 8 digits,
typedef struct odbmdip {
long mdiprog; /* Program number being executed. */
long mdipntr; /* Execution block pointer. */
long crntprog; /* Preread program number. */
long crntpntr; /* Preread block pointer. */
} ODBMDIP ;
|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| mdip | out |
Pointer to the ODBMDIP structure including the execution pointer information.
For program number 4 digits,
typedef struct odbmdip {
short mdiprog; /* Not used */
long mdipntr; /* Not used */
short crntprog; /* Preread program number */
long crntpntr; /* Preread block pointer */
} ODBMDIP ;
For program number 8 digits,
typedef struct odbmdip {
long mdiprog; /* Not used */
long mdipntr; /* Not used */
long crntprog; /* Preread program number */
long crntpntr; /* Preread block pointer */
} ODBMDIP ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This application is not customized for the program number 8 digits. See Program number 8 digits for details. |
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_MODE |
Set CNC mode to MDI. |
program\cnc_rdmdiprgstat
The following information as a state of the MDI program is got.
1) Existence of MDI program
2) Execution start line of MDI program.
Note)
The execution start line of the MDI program changes as follows before and after the execution of the function concerning writing the MDI program or setting the pointer.
cnc_wrmdiprog
1:From the top of program
cnc_wrmdipntr
0:From the pointer of program (In case of 30i, 0i-D/F and PMi-A, immediately after the MDI program registration from initial state, the state become to "1:From the top of program".)
cnc_wractpt
The execution start line is maintained.
*
Even if the cnc_wractpt is executed when the state(bit2) of the execution start line is '1', the program is started from the top of program .
If the cnc_wractpt is executed when the state(bit2) of the execution start line is '0', the program is started from line setted by cnc_wractpt.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdmdiprgstat(unsigned short FlibHndl, unsigned short *status);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. |
| status | out |
Specify the pointer to the variable to store the state of MDIprogram.
Existence of MDI program(bit0,1)
1: Initial state (olny "O0000%") 2: Already registered The execution start line of MDI program in the next execution is shown.
0: From the pointer of program |
ERRORS
| Code | Description |
|---|---|
| EW_MODE |
CNC mode is not MDI mode. |
program\cnc_rdpdf_alldir
Reads the file information under the specified folder.
Execution of this function is kept waiting when CNC is in editing(including the background edit state).
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdpdf_alldir(unsigned short FlibHndl, short *num_prog, IDBPDFADIR *pdf_adir_in, ODBPDFADIR *pdf_adir_out);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||
| num_prog | in/out |
|
|||||||||||||||||||||||||||||||||||||||||||||||||
| pdf_adir_in | in |
Specify the pointer of the IDBPDFADIR structure that stores the folder setting value.
typedef struct idbpdfadir {
/* input */
char path[212]; /* Path name string */
short req_num; /* Request entry number */
short size_kind; /* Output size format */
short type; /* Program list format */
short dummy;
} IDBPDFADIR ;
|
|||||||||||||||||||||||||||||||||||||||||||||||||
| pdf_adir_out | out |
Specify the pointer of ODBPDFADIR structure that stores the
program file information under the folder.
typedef struct odbpdfadir {
/* output */
short data_kind; /* File data kind */
short year; /* Last edited date (year) */
short mon; /* (month) */
short day; /* (day) */
short hour; /* Last edited time (hour) */
short min; /* (minute) */
short sec; /* (second) */
short dummy;
long dummy2;
long size; /* file size */
unsigned long attr; /* attribute */
char d_f[36]; /* name string */
char comment[52]; /* comment */
char o_time;[12] /* process time stamp */
} ODBPDFADIR ;
|
ERRORS
| Code | Description |
|---|---|
| EW_BUSY |
NC uses the current resource. |
| EW_NUMBER |
Subfolder specified by (req_num) does not exist. |
| EW_ATTRIB |
|
| EW_DATA |
The format of folder name(path) is invalid. Specified folder is not found. |
| EW_REJECT |
|
program\cnc_rdpdf_curdir
Reads the information of current folder.
Execution of this function is kept waiting when CNC is in editing(including the background edit state).
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdpdf_curdir(unsigned short FlibHndl, short dir_kind, char *dir_name);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| dir_kind | in |
Specify the kind of current folder to be read.
|
||||||
| dir_name | out |
Specify the pointer for the string that stores "Current drive + folder". |
ERRORS
| Code | Description |
|---|---|
| EW_ATTRIB |
The dir_kind is invalid. |
program\cnc_rdpdf_drive
Reads the information of Program memory drive.
Execution of this function is kept waiting when CNC is in editing(including the background edit state).
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdpdf_drive(unsigned short FlibHndl, ODBPDFDRV *pdf_drv);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| pdf_drv | out |
Specify the pointer of the ODBPDFDRV structure that stores the Program memory drive information.
typedef struct odbpdfdrv {
short max_num; /* Number of drive */
short dummy;
char drive[16][12]; /* Drive name */
} ODBPDFDRV;
|
ERRORS
| Code | Description |
|---|
program\cnc_rdpdf_inf
Reads the information Program memory file on the specified drive.
Execution of this function is kept waiting when CNC is in editing(including the background edit state).
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdpdf_inf(unsigned short FlibHndl, char *drive, short size_kind, ODBPDFINF *pdf_inf);
ARGUMENTS
| Name | Direction | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||
| drive | in |
Specify the drive name string. |
||||||||||||
| size_kind | in |
Specify the data unit, used_page and all_page.
|
||||||||||||
| pdf_inf | out |
Specify the pointer of the ODBPDFINF structure that stores the Program memory drive information.
typedef struct odbpdfinf {
long used_page; /* Used capacity */
long all_page; /* Total capacity */
long used_dir; /* Number of folders in use */
long all_dir; /* Total number of folders */
} ODBPDFINF;
|
ERRORS
| Code | Description |
|---|---|
| EW_DATA |
The drive specified by (drive) does not exist. |
program\cnc_rdpdf_line
Reads the NC program by line basis. This function tries to read the amount of lines which is specified by (*line_len), but when the actual read character size reaches to the number of (*data_len) in this function, the reading process is aborted. When the reset processing is executed in CNC, the processing interrupts can be selected according to the parameter LES(No.11353#3). Inc case of parameter LES(No.11353#3)=0 : The process is not interrupted. Inc case of parameter LES(No.11353#3)=1 : The process is interrupted. The conditions of the function about CNC mode and the kind of program are as follows.
And if the end character of the last line (EOB('\n')) is not finished to read, the last line is not counted as the read line count.
Example)
When you read from 1st to 3rd line of the following program, you have to specify more than 33 as the read character size. If you specify 30 as the character size, the read line count would be 2 because the 3rd line had not been read completely. Then 30 characters would be set in the specified buffer.
O1234 ;
N001 G01 X0. F100 ;
N002 X20. ;
N003 X50. ;
N004 X80. ;
N005 M30 ;
%
O: Available / ×: Not available (The return code is EW_MODE)
MDI mode
Other mode
MDI program
O
×
Selected program
O
O
Not selected program
O
O
This function works normally if OP signal is 1 but STL signal is 0 (for example, feed hold stopping, single block stopping, etc).
When you use this function for the MDI program or the selected program in the following situations, the execution pointer goes to the top of the specified line by line_no.
- MDI program in MDI mode.
- Selected program in EDIT mode.
- Selected program in TJOG/THND mode with the playback option.
And alse by using cnc_setlibopt function, you can force the execution pointer not to be moved.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdpdf_line(unsigned short FlibHndl, char *prog_name, unsigned long line_no, char *prog_data, unsigned long *line_len, unsigned long *data_len);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| prog_name | in |
Program path makes of the "drive name","path name" and "file name". |
| line_no | in |
Specify the line number to read from. |
| prog_data | out |
Specify the address to the buffer to read the program text. |
| line_len | in |
Specify the amount of lines to read. |
| data_len | in |
Specify the size of character to read. |
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_BUSY |
CNC is searching the program text right now. |
|||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
|||||||||
| EW_NOOPT |
The extended driver/library function is necessary. |
|||||||||
| EW_PROT |
CNC parameter is a state of write-protection(O8000-/O9000- protection, encoding). |
|||||||||
| EW_MODE |
|
|||||||||
| EW_REJECT |
CNC is in the emergency stop. |
program\cnc_rdpdf_pglockstat
The numbers of program and the program name is got which setted the
protection of running/editing by cnc_setpdf_pglock.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdpdf_pglockstat(unsigned short FlibHndl,long *num_prog, ODBPRGNAME *prog_name);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. |
| num_prog | out |
Specify the pointer to the variable to store the number of program to which the protection of running/editing was setted. |
| prog_name | out |
Specify the pointer to the ODBPRGNAME structure that stores the program name to which protection of running/edit is set.
typedef struct odbprgname {
char name[MAX_LOCK_PROG][256];
} ODBPRGNAME;
When the program which sets the protection of running/editing does not exist, this data is invalid.
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function is not supported by CNC. |
| EW_NOOPT |
The extended driver/library function is necessary. |
program\cnc_rdpdf_subdir
Reads the information of subfolder under the specified folder.
Execution of this function is kept waiting when CNC is in editing(including the background edit state).
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdpdf_subdir(unsigned short FlibHndl, short *num_dir, IDBPDFSDIR *pdf_sdir_in, ODBPDFSDIR *pdf_sdir_out);
ARGUMENTS
| Name | Direction | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||
| num_dir | in/out |
|
||||||||||
| pdf_sdir_in | in |
Specify the pointer of the IDBPDFSDIR structure that stores the folder setting value.
typedef struct idbpdfsdir {
/* input */
char path[212]; /* Path name string */
short req_num; /* Request entry number */
short dummy;
} IDBPDFSDIR ;
|
||||||||||
| pdf_sdir_out | out |
Specify the pointer of the ODBPDFSDIR structure.
typedef struct odbpdfsdir {
/* output */
short sub_exist; /* existence of subfolder */
short dummy;
char d_f[36]; /* folder name */
} ODBPDFSDIR ;
|
ERRORS
| Code | Description |
|---|---|
| EW_BUSY |
NC uses the current resource. |
program\cnc_rdpdf_subdirn
Reads the number of subfolders/files under the specified folder.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdpdf_subdirn(unsigned short FlibHndl, char *dir_name, ODBPDFNFIL *pdf_nfil);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| dir_name | in |
Specify the pointer for the string that stores "Current drive + folder". |
| pdf_nfil | out |
Specify the pointer to the ODBPDFNFIL structure that stores the number of folders/files.
typedef struct odbpdfnfil {
/* input */
short dir_num; /* number of folders */
short file_num; /* number of files */
} ODBPDFNFIL ;
|
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
||||||
| EW_REJECT |
|
program\cnc_rdpglockstat
The numbers of program and the program number is got which setted the
protection of running/editing by cnc_setpglock.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdpglockstat(unsigned short FlibHndl,long *num_prog, long *prog_no);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. |
| num_prog | out |
Specify the pointer to the variable to store the number of program to which the protection of running/editing was setted. |
| prog_no | out |
Specify the pointer to the variable to store the program number to which the protection of running/editing was setted. |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function is not supported by CNC. |
| EW_LENGTH |
The value of less than four was specified for number of programs(num_prog). |
| EW_NOOPT |
The extended driver/library function is necessary. |
program\cnc_rdprgdirtime
Reads specified number of "Program Number","Comment" and "Processing time" data of the registered
programs in the CNC, starting from the program with the specified Program number.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdprgdirtime(unsigned short FlibHndl, long *top_prog, short *num_prog, PRGDIRTM *buf);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. |
| top_prog | in / out |
Pointer to the starting program number. |
| num_prog | in / out |
Pointer to the number of programs to be read. |
| buf | out |
Pointer to the PRGDIRTM structure where program directory data are returned.
typedef struct prgdirtm {
long prg_no;
char comment[51];
char cuttime[13];
} PRGDIRTM;
Format : (hhhHmmMssS)+NULL (3 digits+H, 2 digits+M, 2 digits+S) |
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
The number of readout(num_prog) is wrong. |
| EW_NUMBER |
The start number of program(top_prog) is wrong. |
| EW_NOOPT |
The machining time stamp option and the extended driver/library function are necessary. |
program\cnc_rdprgnum
Reads program number(modal O number) of the program which is being currently selected in CNC.
As for Series 15i, 16/18/21, 16i/18i/21i, 0i, 30i, Power Mate i, PMi-A, if CNC exetues the
sub-program, this function can read also the main program number.
In this case, that main program number is the root program number which
was selected on the CNC for the execution.
If the program being executed is not a sub-program, the same program
number is set to both 'Running program number' and 'Main program number'.
This function is used for management of NC programs in CNC by the application program, etc.
The program numbers are stored in "buf.data" and 'buf.mdata" with unsigned binary format.
In Series 16/18, 16i/18i, 0i-F, 30i, Power mate i, it is possible to use this function for
the program number 8 digits, however it is necessary to switch API to the one for the
program number 8 digits.
In Series 15i, it is necessary to switch API to the one for the program number 8 digits.
See Program number 8 digits for details.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdprgnum(unsigned short FlibHndl, ODBPRO *prgnum);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| prgnum | out |
Pointer to the ODBPRO structure including the program numbe being executed.
For program number 4 digits,
typedef struct odbpro {
short dummy[2] ; /* Not used. */
short data ; /* Running program number. */
short mdata ; /* Main program number. */
} ODBPRO ; /* */
For program number 8 digits,
typedef struct odbpro {
short dummy[2] ; /* Not used */
long data ; /* Running program number. */
long mdata ; /* Main program number. */
} ODBPRO ; /* */
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This application is not customized for the program number 8 digits. See Program number 8 digits for details. |
| EW_PARAM |
7613#0=0 when CNC is turned on. Set CNC parameter again. |
program\cnc_rdproctime
Reads processing time stamp data of CNC programs measured by the CNC.
When no processing time stamp data is available, 0 is returned in the element "nNum" of the user define type ODBPTIME.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdproctime(unsigned short FlibHndl, ODBPTIME *buf);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. |
| buf | out |
Pointer to the ODBPTIME structure where returned data are stored.
typedef struct odbptime {
short num;
struct{
long prg_no;
short hour;
char minute;
char second;
}data[10];
} ODBPTIME;
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The machining time stamp option and the coextended driver/library function are necessary. |
program\cnc_rdprogdir
Reads the list of program numbers (program directory) of all NC programs registered in CNC.
Program numbers, comments and character numbers of programs included in specified program number range are read with ASCII string format. As for type=1 in series 15/15i, the range specification is invalid and all programs are always read.
In Series 16/18, 16i/18i, Power Mate i, it is possible to use this function for the program number 8 digits, however it is necessary to switch API to the one for the program number 8 digits. The program directory list which is read from CNC is the string composed of ASCII characters as the following format.
Specify the start program number to be read in "datano_s" and the end one in "datano_e".
Store "datano_s=1" and "datano_e"=9999 to read all programs.
In Series 15i, it is necessary to switch API to the one for the program number 8 digits.
See Program number 8 digits for details.
Format of input data
type=0 Oxxxx Oxxxx ... %
type=1 % LF Oxxxx (COMMENT) LF Oxxxx (COMMENT) LF ... LF %
type=2 Oxxxx (COMMENT) CHAR_NUMBER Oxxxx (COMMENT) CHAR_NUMBER ... %
where,
LF
0x0A ('\n': EOB)
Oxxxx
Program number.
This is an ASCII string without the leading '0' at numeric part, and sorted in numeric order. ("O1" - "O9999")
CHAR_NUMBER
Character number of the program.
This is an ASCII string without the leading '0'. The number is raised to 80-character unit.
COMMENT
The comment which is written just after the program number is stored.
The maximum character number of the comment body is 48. (50 including the before and the behind parentheses.) Only beginning 48 characters are stored for the comment in case that the length of the comment is longer than 48 characters. If the program has no comment, only parentheses ("()") are stored.
For all cases, when no program is registered or there is no program in the specified range, only '%' is stored.
A null character('\0') is not added at the end of each strings stored in the buffer.
For example, when the next programs are registered in CNC, the result of this function, in case that datano_s=1 and datano_e=9999, is as follows.
Program number (COMMENT)
Character number
O0012 (TEST) ;
420
O0200 (WORK1);
352
O0201 ;
537
O9001 (SUB-PRO1) ;
781
type
Contents to be read
0
"O12O200O201O9001%"
1
"%\nO12(TEST)\nO200(WORK1)\nO201()\nO9001(SUB-PRO1)\n%"
2
"O12(TEST)420O200(WORK1)352O201()537O9001(SUB-PRO1)781%"
If the buffer size is not enough for the specified programs, the buffer is filled up to the specified size.
In case of 15 bytes, the result is as follows.
type
Contents to be read
0
"O12O200O201O900"
1
"%\nO12(TEST)\nO20"
2
"O12(TEST)420O20"
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdprogdir(unsigned short FlibHndl,short type, short datano_s,short datano_e,unsigned short length, PRGDIR *prgdir);For the program number 8 digits :
FWLIBAPI short WINAPI cnc_rdprogdir(unsigned short FlibHndl,short type, long datano_s,long datano_e,unsigned short length, PRGDIR *prgdir);
ARGUMENTS
| Name | Direction | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. |
|||||||||
| type | in |
|
|||||||||
| datano_s | in |
Specify the start program number. |
|||||||||
| datano_e | in |
Specify the end program number. |
|||||||||
| length | in |
Specify the length of a block(buffer size). |
|||||||||
| prgdir | out |
Pointer to the PRGDIR structure including program directory.
typedef struct prgdir {
char prg_data[MAX_PBUF] ; /* Directory data. */
} PRGDIR ; (MAX_PBUF : maximum character number to read)
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This application is not customized for the program number 8 digits. See Program number 8 digits for details. |
| EW_LENGTH |
Length of the block (length) is illegal. |
| EW_NUMBER |
Start program number (datano_s) or end program number (datano_e) is illegal. |
| EW_ATTRIB |
Output format(type) is illegal. |
program\cnc_rdprogdir2
Reads the program directory of all the programs registered in the CNC.
Reads specified number of "Program Number","Comment" and "Program size (number of characters)"
data of the registered programs in the CNC, starting from the program with the specified Program number.
It has the function to specify the number of programs to be read in order to get the information
corresponding to the number of programs which is set by the application.
It is possible to use this function for the program number 8 digits,
however it is necessary to switch API to the one for the program number 8 digits.
See Program number 8 digits for details.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdprogdir2(unsigned short FlibHndl, short type, short *top_prog, short *num_prog, PRGDIR2 *buf);For the program number 8 digits :
FWLIBAPI short WINAPI cnc_rdprogdir2(unsigned short FlibHndl, short type, long *top_prog, short *num_prog, PRGDIR2 *buf);
ARGUMENTS
| Name | Direction | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||
| type | in |
|
|||||||||
| top_prog | in / out |
Pointer to the starting program number. |
|||||||||
| num_prog | in / out |
Pointer to the number of programs to be read. |
|||||||||
| buf | out |
Pointer to the PRGDIR2 structure where program directory data are returned.
For program number 4 digits,
typedef struct prgdir2 {
short number;
long length;
char comment[51];
char dummy;
} PRGDIR2;
For program number 8 digits,
typedef struct prgdir2 {
long number;
long length;
char comment[51];
char dummy;
} PRGDIR2;
When no programs are registered or no programs match the specified condition, "0" is returned to "num_prog". |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This application is not customized for the program number 8 digits. See Program number 8 digits for details. |
| EW_LENGTH |
The number of readout(num_prog) is wrong. |
| EW_NUMBER |
The start number of program(top_prog) is wrong. |
| EW_ATTRIB |
Output format(type) is wrong. |
program\cnc_rdprogdir3
Reads the program directory of all the programs registered in the CNC.
Reads "Program Number", "Comment", "Date (created and modified)" and Program size" data of
which the specified amount of programs are registered programs in the CNC, starting from the program
with the specified Program number.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdprogdir3(unsigned short FlibHndl, short type, long *top_prog, short *num_prog, PRGDIR3 *buf);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||
| type | in |
|
|||||||||||||||
| top_prog | in / out |
Pointer to the starting program number. |
|||||||||||||||
| num_prog | in / out |
Pointer to the number of programs to be read. |
|||||||||||||||
| buf | out |
Pointer to the PRGDIR3 structure where program directory data are returned.
typedef struct prgdir3 {
long number;
long length;
long page;
char comment[52];
struct{
short year;
short month;
short day;
short hour;
short minute;
short dummy;
} mdate;
struct{
short year;
short month;
short day;
short hour;
short minute;
short dummy;
} cdate;
} PRGDIR3;
When no programs are registered or no programs match the specified condition, "0" is returned to "num_prog". |
|||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||
| type | in |
|
|||||||||||||||
| top_prog | in / out |
Pointer to the starting program number. |
|||||||||||||||
| num_prog | in / out |
Pointer to the number of programs to be read. Actual number of programs being read is stored after this function call. |
|||||||||||||||
| buf | out |
Pointer to the PRGDIR3 structure where program directory data are returned.
typedef struct prgdir3 {
long number;
long length;
long page;
char comment[52];
struct{
short year;
short month;
short day;
short hour;
short minute;
short dummy;
} mdate;
struct{
short year;
short month;
short day;
short hour;
short minute;
short dummy;
} cdate;
} PRGDIR3;
When no programs are registered or no programs match the specified condition, "0" is returned to "num_prog". |
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
The number of readout (num_prog) is wrong. |
| EW_NUMBER |
The start number of program (top_prog) is wrong. |
| EW_ATTRIB |
Output format (type) is wrong. |
program\cnc_rdprogdir4
Reads the program directory of all the programs registered in the CNC.
Reads "Program Number", "Comment", "Date (created and modified)" and "Program size" data of which the specified number of programs are registered programs in the CNC, starting from the program with the specified number(from the first program).
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdprogdir4(unsigned short FlibHndl, short type, long top_number, short *num_prog, PRGDIR4 *buf);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. |
|||||||||||||||
| type | in |
|
|||||||||||||||
| top_number | in |
Specified the program number from the head to want to acquire program information.(1-) |
|||||||||||||||
| num_prog | in / out |
Pointer to the number of programs to be read. Actual number of programs being read is stored after this function call. |
|||||||||||||||
| buf | out |
Pointer to the PRGDIR4 structure where program directory data are returned.
typedef struct prgdir4 {
long number;
long length;
long page;
char comment[52];
struct{
short year;
short month;
short day;
short hour;
short minute;
short dummy;
} mdate;
struct{
short year;
short month;
short day;
short hour;
short minute;
short dummy;
} cdate;
} PRGDIR4;
When no programs are registered or no programs match the specified condition, "0" is returned to "num_prog". |
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
The number of readout (num_prog) is wrong. |
| EW_NUMBER |
The start number of program (top_number) is wrong. |
| EW_ATTRIB |
Output format (type) is wrong. |
program\cnc_rdproginfo
Reads the management data of NC programs already registered in CNC.
The management data of NC program are
This function returns these data with binary format or ASCII string format.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdproginfo(unsigned short FlibHndl, short type, short length, ODBNC *prginfo);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||
| type | in |
Specify the output format.
|
||||||||||||||||||
| length | in |
Specify the length of data block.
|
||||||||||||||||||
| prginfo | out |
prginfo Pointer to the ODBNC structure including the program directory.
typedef struct odbnc {
union {
struct {
short reg_prg ; /* Number of registered programs. */
short unreg_prg ; /* Number of available programs. */
long used_mem ; /* Character number of used memory. */
long unused_mem ;/* Character number of unused memory. */
} bin ;
char asc[31] ; /* Buffer for ASCII format */
} u ;
} ODBNC ;
% LF d1 LF d2 LF d3 LF d4 LF %
|
||||||||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||
| type | in |
Specify the output format.
|
||||||||||||||||||
| length | in |
Specify the length of data block.
|
||||||||||||||||||
| prginfo | out |
prginfo Pointer to the ODBNC structure including the program directory.
typedef struct odbnc {
union {
struct {
short reg_prg ; /* Number of registered programs. */
short unreg_prg ; /* Number of available programs. */
long used_mem ; /* Character number of used memory. */
long unused_mem ;/* Character number of unused memory. */
} bin ;
char asc[31] ; /* Buffer for ASCII format */
} u ;
} ODBNC ;
% LF d1 LF d2 LF d3 LF d4 LF %
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Length of the block (length) is illegal. |
| EW_ATTRIB |
Output format (type) is illegal. |
program\cnc_rdprogline
Reads the NC program by line basis. This function tries to read the amount of lines which is specified by (*line_len), but when the actual read character size reaches to the number of (*data_len) in this function, the reading process is aborted. The conditions of the function about CNC mode and the kind of program are as follows.
And if the end character of the last line (EOB('\n')) is not finished to read, the last line is not counted as the read line count.
Example)
When you read from 1st to 3rd line of the following program, you have to specify more than 33 as the read character size. If you specify 30 as the character size, the read line count would be 2 because the 3rd line had not been read completely. Then 30 characters would be set in the specified buffer.
O1234 ;
N001 G01 X0. F100 ;
N002 X20. ;
N003 X50. ;
N004 X80. ;
N005 M30 ;
%
O: Available / ×: Not available (The return code is EW_MODE)
MDI mode
Other mode
MDI program
O
×
Selected program
O
O
Not selected program
O
O
This function works normally if OP signal is 1 but STL signal is 0 (for example, feed hold stopping, single block stopping, etc).
When you use this function for the MDI program or the selected program in the following situations, the execution pointer goes to the top of the specified line by line_no.
- MDI program in MDI mode.
- Selected program in EDIT mode.
- Selected program in TJOG/THND mode with the playback option.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdprogline(unsigned short FlibHndl, long prog_no, unsigned long line_no, char *prog_data, unsigned long *line_len, unsigned long *data_len);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| prog_no | in |
Specify the program number to read. |
| line_no | in |
Specify the line number to read from. |
| prog_data | out |
Specify the address to the buffer to read the program text. |
| line_len | in/out |
Specify the amount of lines to read. |
| data_len | in/out |
Specify the size of character to read. |
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_BUSY |
|
|||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
|||||||||
| EW_NOOPT |
The extended driver/library function is necessary. |
|||||||||
| EW_MODE |
|
|||||||||
| EW_PROT |
CNC parameter is a state of write-protection (O8000-/O9000- protection, encoding). |
|||||||||
| EW_REJECT |
|
program\cnc_rdprogline2
Reads the NC program by line basis. This function cannot be used to MDI program. This function tries to read the amount of lines which is specified by (*line_len), but when the actual read character size reaches to the number of (*data_len) in this function, the reading process is aborted. The conditions of the function about CNC mode and the kind of program are as follows.
And if the end character of the last line (EOB('\n')) is not finished to read, the last line is not counted as the read line count.
Example)
When you read from 1st to 3rd line of the following program, you have to specify more than 33 as the read character size. If you specify 30 as the character size, the read line count would be 2 because the 3rd line had not been read completely. Then 30 characters would be set in the specified buffer.
O1234 ;
N001 G01 X0. F100 ;
N002 X20. ;
N003 X50. ;
N004 X80. ;
N005 M30 ;
%
O: Available
MDI mode
Other mode
MDI program
(*1)
×(*2)
Selected program
O
O
Not selected program
O
O
(*1) 16i:The return code is EW_DATA and the detail status is 1. 30i,0i-D/F,PMi-A:Available
(*2) The return code is EW_MODE
This function works normally if OP signal is 1 but STL signal is 0 (for example, feed hold stopping, single block stopping, etc).
When you use this function for the MDI program or the selected program in the following situations, the execution pointer goes to the top of the specified line by line_no.
In this function, the execution pointer never moves like cnc_rdprogline.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdprogline2(unsigned short FlibHndl, long prog_no, unsigned long line_no, char *prog_data, unsigned long *line_len, unsigned long *data_len);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| prog_no | in |
Specify the program number to read. |
| line_no | in |
Specify the line number to read from. |
| prog_data | out |
Specify the address to the buffer to read the program text. |
| line_len | in/out |
Specify the amount of lines to read. |
| data_len | in/out |
Specify the size of character to read. |
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_BUSY |
|
|||||||||
| EW_BUSY |
CNC is searching the program text right now. |
|||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
|||||||||
| EW_NOOPT |
The extended driver/library function is necessary. |
|||||||||
| EW_MODE |
|
|||||||||
| EW_PROT |
CNC parameter is a state of write-protection (O8000-/O9000- protection, encoding). |
|||||||||
| EW_REJECT |
|
|||||||||
| EW_REJECT |
CNC is in the emergency stop. |
program\cnc_rdseqnum
Reads the sequence number of the NC program which is being currently executed in CNC.
If the NC program has no sequence numbers in its all blocks,
the sequence number of the last executed block is read.
This function is used for watch the block being executed or the current
process by the application program, or only displaying the current sequence number.
The sequence number is stored in "buf.data" with unsigned binary format.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdseqnum(unsigned short FlibHndl, ODBSEQ *seqnum);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| seqnum | out |
Pointer to the ODBSEQ structure including the sequence number under execution.
typedef struct odbseq {
short dummy[2] ; /* Not used. */
long data ; /* Sequence number in executing. */
} ODBSEQ ;
|
ERRORS
| Code | Description |
|---|---|
| EW_PARAM |
7613#0=0 when CNC is turned on. Set CNC parameter again. |
program\cnc_renameprog
Changes the program number.
PROTOTYPE
FWLIBAPI short WINAPI cnc_renameprog(unsigned short FlibHndl, long old_no, long new_no);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| old_no | in |
Old program number |
| new_no | in |
New Program number |
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_BUSY |
|
||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of OBDERR structure.
|
||||||
| EW_NOOPT |
The extended driver/library function is necessary. |
||||||
| EW_PROT |
|
||||||
| EW_REJECT |
|
program\cnc_resetpdf_pglock
The protection of running/editing is released.
PROTOTYPE
FWLIBAPI short WINAPI cnc_resetpdf_pglock(unsigned short FlibHndl, char *prog_name);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. |
| prog_name | in |
Program name |
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_FUNC |
This function is not supported by CNC. |
||||||
| EW_DATA |
The following detail status will be set onto the member, err_no of ODBERR structure.
|
||||||
| EW_NOOPT |
The extended driver/library function is necessary. |
program\cnc_resetpglock
The protection of running/editing is released.
PROTOTYPE
FWLIBAPI short WINAPI cnc_resetpglock(unsigned short FlibHndl, long prog_no);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. |
| prog_no | in |
Specify the program number |
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_FUNC |
This function is not supported by CNC. |
|||||||||
| EW_DATA |
The following detail status will be set onto the member, err_no of ODBERR structure.
|
|||||||||
| EW_NOOPT |
The extended driver/library function is necessary. |
program\cnc_rewind
Sets cursor to the top of selected NC program in CNC. MEM, EDIT mode(Series 30i/31i/32i, 0i-D/F, PMi-A) other than MDI mode(Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i) When this function is executed during the subprogram call(STOP mode). Series 30i/31i/32i, 0i-D/F, PMi-A : Subprogram is rewinded. Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i : Main program is rewinded. However when No.3204#1=1, EW_REJECT is returned.
Program select
none
exist
Availability of editing
-
Prohibition
Permission
Availability of searching(No.3202#6)
-
Prohibition(=0)
Permission(=1)
-
Rewind
not available
available
Return value
EW_REJECT
EW_PROT
EW_OK
Program select
none
exist
Availability of editing
-
Prohibition
Permission
Availability of searching(No.3202#6)
-
Prohibition(=0)
Permission(=1)
-
Rewind
not available
available
Return value
EW_OK
PROTOTYPE
FWLIBAPI short WINAPI cnc_rewind(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
ERRORS
| Code | Description |
|---|---|
| EW_MODE |
See the section of CNC mode. |
| EW_PROT |
|
| EW_REJECT |
|
| EW_NOOPT |
The extended driver/library function is necessary. |
program\cnc_saveprog_end
This function gets the result of cnc_saveprog_start function.
If cnc_saveprog_start function is being executed, the return value is "EW_BUSY". Please command this function repeatedly until the return value becomes besides "EW_BUSY".
PROTOTYPE
FWLIBAPI short WINAPI cnc_saveprog_end(unsigned short FlibHndl, short *result);
ARGUMENTS
| Name | Direction | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||
| result | out |
Specify the pointer of the variable to the return result of program saving.
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
| EW_BUSY |
Wait until the completion of CNC processing. |
program\cnc_saveprog_start
If CNC parameter HPM(No.11354#7) is set to 1, the programs are saved by calling with this function. In this case, this function requests save of program to CNC. A basic procedure for program saving is shown below.
If this function is commanded, it is necessary to confirm the result of program saving by cnc_saveprog_end function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_saveprog_start(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
ERRORS
| Code | Description |
|---|---|
| EW_REJECT |
cnc_saveprog_start function has been executed. Terminate a uploading by using cnc_saveprog_end function. |
program\cnc_search
In case of Series 15/15i, searching is delayed under the following condition.
•Edit processing on the CNC side (include background edit processing)
•downloading, verifying
In Series16/18, 16i/18i, 0i-F, 30i, Power Mate i, it is possible to use this function for
the program number 8 digits, however it is necessary to switch API to the one for the program
number 8 digits.
In Series 15i, it is necessary to switch API to the one for the program number 8 digits.
See Program number 8 digits for details.
It is possible to use this function for the program number 8 digits,
however it is necessary to switch API to the one for the program number 8 digits.
In Series 15i, it is necessary to switch API to the one for the program number 8 digits.
See Program number 8 digits for details.
PROTOTYPE
FWLIBAPI short WINAPI cnc_search(unsigned short FlibHndl, short number);For the program number 8 digits :
FWLIBAPI short WINAPI cnc_search(unsigned short FlibHndl, long number);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| number | in |
Specify program number. |
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| number | in |
Specify program number. |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This application is not customized for the program number 8 digits. See "Program number 8 digits" for details. |
| EW_BUSY |
|
| EW_DATA |
Program(number) is not found. |
| EW_PROT |
Program is protected from editing. |
program\cnc_searchresult
Gets the result of cnc_searchword function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_searchresult(unsigned short FlibHndl, unsigned long *line_no);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| line_no | out |
Specify the pointer to the variable to store the line number having the string that has been found by cnc_searchword. Unless the return code is EW_OK, the variable (*line_no) is not available. |
ERRORS
| Code | Description |
|---|---|
| EW_BUSY |
|
| EW_FUNC |
|
| EW_NUMBER |
The line number from which is started to search is not found. |
| EW_DATA |
The target string to search is not found. |
| EW_NOOPT |
The extended driver/library function is necessary. |
program\cnc_searchword
Searches the string within the NC program. The basic order to search is as follows.
The conditions of the function about CNC mode and the kind of programare as follows.
O: Available / ×: Not available (The return code is EW_MODE)
EDIT mode
MDI mode
Other mode
MDI program
×
O
×
Selected program
O
×
×
Not selected program
O
O
O
If you have the playback option, TJOG/THND mode is the same as EDIT.
This function works normally if OP signal is 1 but STL signal is 0 (for example, feed hold stopping, single block stopping, etc).
After you use this function for the MDI program or the selected program in the following situations, the execution pointer goes to a certain place.
- MDI program in MDI mode.
- Selected program in EDIT mode.
- Selected program in TJOG/THND mode with the playback option.
In those cases, the execution pointer moves to the following place.
- If the target string could be found, the pointer would move to the line where includes the target string.
- If the target string could not be found, the pointer would move to the top of the program in case of the parameter "direct=0", or the bottom of the program in case of the parameter "direct=1".
PROTOTYPE
FWLIBAPI short WINAPI cnc_searchword(unsigned short FlibHndl, long prog_no, unsigned long line_no, short type, short direct, unsigned long repeat, char *prog_data);
ARGUMENTS
| Name | Direction | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||
| prog_no | in |
Specify the program number to search. |
|||||||||
| line_no | in |
Specify the line number to search from. |
|||||||||
| type | in |
Specify the type of the search operation.
When you commands "Character search", you have to set the only one address character as the target string. If you set except the address character or more than two characters, this function returns EW_DATA error. When you commands "Word search" for the only one address character, you have no error and the address character is going to be searched. When you commands "Last line search", this function ignores the parameters direct, repeat and prog_data. |
|||||||||
| direct | in |
Specify the direction to search.
|
|||||||||
| repeat | in |
Specify the limitation of times the string is found when there are many strings matching within the program. |
|||||||||
| prog_data | in |
Specify the pointer to the buffer holding the target string to search. The first character of the string must be an address character (G, F, etc).
|
ERRORS
| Code | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_BUSY |
|
||||||||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
||||||||||||||||||
| EW_NOOPT |
The extended driver/library function is necessary. |
||||||||||||||||||
| EW_MODE |
|
||||||||||||||||||
| EW_PROT |
CNC parameter is a state of write-protection(O8000-/O9000- protection, encoding). |
||||||||||||||||||
| EW_REJECT |
|
program\cnc_seqsrch
Searches the specified sequence number of the selected program in CNC. CNC mode is changed to "STOP" mode after searching.(except FS30i, FS0i-D/F, PMi-A)
PROTOTYPE
FWLIBAPI short WINAPI cnc_seqsrch(unsigned short FlibHndl, long seq_no);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| seq_no | in |
Specify sequence number. |
ERRORS
| Code | Description |
|---|---|
| EW_DATA |
The specified sequence number does not exist. |
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_MODE |
See the section of CNC mode. |
| EW_REJECT |
|
program\cnc_seqsrch2
Searches the specified sequence number of the selected program in CNC. The searching speed of this function is more than cnc_seqsrch. The status of CNC does not change in this function though CNC becomes "STOP" mode by the cnc_search function after searches.
PROTOTYPE
FWLIBAPI short WINAPI cnc_seqsrch2(unsigned short FlibHndl, long seq_no);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| seq_no | in |
Specify sequence number. |
ERRORS
| Code | Description |
|---|---|
| EW_DATA |
The specified sequence number does not exist. |
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_MODE |
See the section of CNC mode. |
| EW_REJECT |
|
program\cnc_setpdf_pglock
The running by the subprogram call to the program in the CNC memory is prohibited.
1) Program search and delete
And the following operations and the execution of function are prohibited.
1) Program edit and search
Library
2) O number search
3) Program input/output from input-output device
cnc_search, cnc_pdf_del
-> EW_PROT error occurs
cnc_pdf_delall
-> The program which was protected by the parameter or this function is not deleted, but other program are deleted.
2) Program downloading and verifying
-
cnc_download3, cnc_dwnend3, cnc_download4, cnc_dwnend4, cnc_verify4, cnc_vrfend4
-> EW_PROT error occurs
3) Copy and rename of program.
-
cnc_pdf_copy
-> When the protected program number is specified for destination number, EW_PROT error occurs.
cnc_pdf_rename
-> When the protected program number is specified for old program number, EW_PROT error occurs.
Note) Even if the program is protected by cnc_setpglock function, the edit by the line edit function is possible.
Setting of the protection of running/editing can be set to program of 12.
The setting by this function becomes effective until the setting is released by cnc_resetpdf_pglock or the CNC is turned off.
The procedure to edit existing program by the application is shown as follows.
| 1) | The protection of running/editing to the program which wants to be edited is set by cnc_setpdf_pglock. |
| 2) | The program is edited by the line editing function. |
| 3) | The protection of running/editing is released by cnc_resetpdf_pglock and editing is end. |
| * | If you want to edit the new program, it is necessary to register the new program before the procedure 1. |
- O0000 (In case of program number eight digits : "O00000000")
- Selected program or running program (Main, nesting, executing)
- Program protected by parameter. (O9000 or later etc.)
- MDI program.
PROTOTYPE
FWLIBAPI short WINAPI cnc_setpdf_pglock(unsigned short FlibHndl, char *prog_name);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. |
| prog_name | in |
Program name |
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_FUNC |
This function is not supported by CNC. |
||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
||||||
| EW_NOOPT |
The extended driver/library function is necessary. |
||||||
| EW_OVRFLOW |
The protection of running/editing has already been set to the program of 12. |
||||||
| EW_REJECT |
The selected program or running program(Main, nesting, executing) was specified for program name(prog_name). |
program\cnc_setpglock
The running by the subprogram call to the program in the CNC memory is prohibited.
1) Program search and delete
And the following operations and the execution of function are prohibited.
1) Program edit and search
Library
2) O number search
3) Program input/output from input-output device
cnc_search, cnc_delete
-> EW_PROT error occurs
cnc_delall
-> The program which was protected by the parameter or this function is not deleted, but other program are deleted.
2) Program downloading and verifying
-
cnc_download, cnc_cdownload, cnc_dwnend,cnc_verify, cnc_cverify, cnc_vrfend, cnc_download3, cnc_dwnend3
-> EW_PROT error occurs
3) Copy and rename of program.
-
cnc_copyprog
-> When the protected program number is specified for destination number, EW_PROT error occurs.
cnc_renameprog
-> When the protected program number is specified for old program number, EW_PROT error occurs.
Note) Even if the program is protected by cnc_setpglock function, the edit by the line edit function is possible.
Setting of the protection of running/editing can be set to each path.
The protection of running/editing can be set to one path up to program of four.
The setting by this function becomes effective until the setting is released by cnc_resetpglock or the CNC is turned off.
The procedure to edit existing program by the application is shown as follows.
| 1) | The protection of running/editing to the program which wants to be edited is set by cnc_setpglock. |
| 2) | The program is edited by the line editing function. |
| 3) | The protection of running/editing is released by cnc_resetpglock and editing is end. |
| * | If you want to edit the new program, it is necessary to register the new program before the procedure 1. |
- O0000 (In case of program number eight digits : "O00000000")
- Selected program or running program (Main, nesting, executing)
- Program protected by parameter. (O9000 or later etc.)
- MDI program.
PROTOTYPE
FWLIBAPI short WINAPI cnc_setpglock(unsigned short FlibHndl, long prog_no);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. |
| prog_no | in |
Program number |
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_FUNC |
This function is not supported by CNC. |
|||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
|||||||||
| EW_NOOPT |
The extended driver/library function is necessary. |
|||||||||
| EW_PROT |
The program protected in program number(prog_no) by the parameter was specified. |
|||||||||
| EW_OVRFLOW |
The protection of running/editing has already been set to the program of 4. |
|||||||||
| EW_REJECT |
The selected program or running program(Main, nesting, executing) was specified for program number(prog_no). |
program\cnc_upend
Notifies the end of uploading NC program to the internal logic of the Data window library.
(This function must be executed after cnc_upload /
cnc_cupload.)
PROTOTYPE
FWLIBAPI short WINAPI cnc_upend(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
program\cnc_upend3
Notifies the end of uploading NC program to the internal logic of the Data window library.
There are cases where errors(EW_DATA, etc.) during execution of uploading NC program are returned by this function.
(This function must be executed after cnc_upload3 function.)
PROTOTYPE
FWLIBAPI short WINAPI cnc_upend3(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_FUNC |
|
||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
||||||
| EW_PROT |
Tape memory is read-protected by the CNC parameter setting(O8000-/O9000- protection, encoding). See Description about the timing of error. |
||||||
| EW_REJECT |
Uploading is disable in the current CNC status. (Machining, resetting, mode changing) See Description about the timing of error. |
||||||
| EW_ALARM |
Alarm has occurred while uploading. See Description about the timing of error. |
program\cnc_upend4
Notifies the end of uploading NC program to the internal logic of the Data window library.
(This function must be executed after cnc_upload4 function.)
PROTOTYPE
FWLIBAPI short WINAPI cnc_upend4(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_FUNC |
|
||||||
| EW_DATA |
The following detail status will be set onto the member, err_no of ODBERR structure.
|
||||||
| EW_PROT |
Tape memory is read-protected by the CNC parameter setting(O8000-/O9000- protection, encoding). See Description about the timing of error. |
program\cnc_upload
Read NC program registered on the tape memory in CNC (program memory). The procedure of uploading is as follows.
NC program which is read from CNC is the string composed of ASCII characters as following format.
% LF Oxxxx LF Block1 LF Block2 LF ... LF Mxx LF %
where,
LF
0x0A ('\n': EOB)
Oxxxx
Program number
Mxx
M code at the end of the program(M02,M30,etc.)
A null character('0x00') is not added at the end of each string stored in the buffer.
The last character of read NC program is '%'.
If the application keeps reading by using this function after reading the last '%',
only '%' can be read for Series 15/15i, nothing can be read for Series 16/18/21,
16i/18i/21i, 0i, 30i, Power Mate i, PMi-A.
O1234 ;
G1 F0.3 W10. ;
M30 ;
%
-
you will get the following strings.
- In case of fully large buffer. Series 15/15i
- And in case that the buffer size is less than 24 bytes, you will get the following strings.
| 1st time | "%\nO1234\nG1F0.3W10.\nM30\n%" | (24 characters) | |
| 2nd and after | "%" | (1 character) |
| 1st time | "%\nO1234\nG1F0.3W10.\nM30\n%" | (24 characters) | |
| 2nd and after | "" | (0 character) |
In case that the buffer size is 10 bytes. Series 15/15i
| 1st time | "%\nO1234\nG1" | (10 characters) | |
| 2nd time | "F0.3W10.\nM" | (10 characters) | |
| 3rd time | "30\n%" | (4 characters) | |
| 4th and after | "%" | (1 characters) |
| 1st time | "%\nO1234\nG1" | (10 characters) | |
| 2nd time | "F0.3W10.\nM" | (10 characters) | |
| 3rd time | "30\n%" | (4 characters) | |
| 4th and after | "" | (0 characters) |
PROTOTYPE
FWLIBAPI short WINAPI cnc_upload(unsigned short FlibHndl,ODBUP *upld,unsigned short *number);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. |
| upld | out |
Pointer to the ODBUP structure including the NC program. The ODBUP structure is as follows.
typedef struct odbup {
short dummy[2] ; /* Not used. */
char data[MAX_RBUF] ; /* NC program data. */
} ODBUP ; (MAX_RBUF : maximum character number to read)
The default value of read buffer size (MAX_RBUF) with ODBUP structure is 256.
|
| number | in/out |
Specify the address of the variable which shows number of characters to be read. |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
| EW_LENGTH |
The read number of characters of NC program number(*number) is 0. |
program\cnc_upload3
Read NC data registered on the memory in CNC.
This function reads the characters of NC data as long as it is specified by '*length'.
In case that this function cannot read at least one character,
it returns EW_BUFFER, so again call this function with the same arguments.
Because importance is attached to the speed of data transfer to the CNC, in general,
return of errors(EW_DATA, etc.) may be delayed.
Namely, an error status may refrect the result caused by the previously executed cnc_upload3 callings.
And the error status for some cnc_upload3 callings just before the finish of uploading is returned
by cnc_upend3 function.
NC data which is read from CNC is the string composed of ASCII characters as following format.
% LF Block1 LF Block2 LF ... LF %
A null character('\x00') is not added at the end of each string stored in the buffer.
In case of 30i/31i/32i, 0i-D/F and PMi-A, when the CNC parameter No.6019#0 is '1', the number of the macro variable and the variable data are output as a comment continuously after '%' of the end of data.
However, if the number of characters to read is less than the specified number by delaying CNC data process,
this function reads the characters as many as possible and then sets length' with the real number of
characters which are read in the buffer.
Format of input data
where LF = 0x0A ('\n')
or
% LF CR CR Block1 LF CR CR Block2 LF CR CR ... LF CR CR %
where CR = 0x0D ('\r') , LF = 0x0A ('\n')
The parameter (Series 15i:0000#3, Series 16i/18i/21i/0i/Power Mate i:0100#3)
determines which is used. And space code (' ') may be inserted before LF for TV check.
See the CNC operaation manual for details.
The last character of read NC data is '%'. If the application keeps reading by using this function
after reading the last '%', cnc_upload3 returns EW_RESET.
In case of 30i/31i/32i, 0i-D/F and PMi-A, the protected NC program(O8000-/O9000- protection, encoding) is acquired as "% LF % LF", and EW_PROT error will return by cnc_upend3.
PROTOTYPE
FWLIBAPI short WINAPI cnc_upload3(unsigned short FlibHndl, long *length, char *data);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| length | in/out |
Specify the pointer of the variable to the character length of NC data. After reading, the number of characters actually read is set in this variable again. This function returns EW_LENGTH if '*length' is less than 256. |
| data | out |
Specify the pointer to the buffer to be read. |
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_RESET |
The data to read is nothing. Call the cnc_upend3 function. |
||||||
| EW_FUNC |
|
||||||
| EW_LENGTH |
|
||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
||||||
| EW_PROT |
Tape memory is read-protected by the CNC parameter setting(O8000-/O9000- protection, encoding). See Description about the timing of error. |
||||||
| EW_BUFFER |
Retry because the buffer is empty. See Description about the timing of error. |
||||||
| EW_REJECT |
Uploading is disable in the current CNC status. (Machining, resetting, mode changing) See Description about the timing of error. |
||||||
| EW_ALARM |
Alarm has occurred while uploading. See Description about the timing of error. |
program\cnc_upload4
Read NC data registered on the memory in CNC.
This function reads the characters of NC data as long as it is specified by '*length'.
In case that this function cannot read at least one character,
it returns EW_BUFFER, so again call this function with the same arguments.
Because importance is attached to the speed of data transfer to the CNC, in general,
return of errors(EW_DATA, etc.) may be delayed.
Namely, an error status may refrect the result caused by the previously executed cnc_upload callings.
And the error status for some cnc_upload callings just before the finish of uploading is returned
by cnc_upend4 function.
NC data which is read from CNC is the string composed of ASCII characters as following format.
% LF Block1 LF Block2 LF ... LF %
A null character('\x00') is not added at the end of each string stored in the buffer.
When the CNC parameter No.6019#0 is '1', the number of the macro variable and the variable data are output as a comment continuously after '%' of the end of data.
However, if the number of characters to read is less than the specified number by delaying CNC data process,
this function reads the characters as many as possible and then sets length' with the real number of
characters which are read in the buffer.
where LF = 0x0A ('\n')
or
% LF CR CR Block1 LF CR CR Block2 LF CR CR ... LF CR CR %
where CR = 0x0D ('\r') , LF = 0x0A ('\n')
The parameter (Series 15i:0000#3, Series 16i/18i/21i/0i/Power Mate i:0100#3)
determines which is used. And space code (' ') may be inserted before LF for TV check.
The last character of read NC data is '%'. If the application keeps reading by using this function
after reading the last '%', cnc_upload3 returns EW_RESET.
The protected NC program(O8000-/O9000- protection, encoding) is acquired as "% LF % LF", and EW_PROT error will return by cnc_upend4.
PROTOTYPE
FWLIBAPI short WINAPI cnc_upload4(unsigned short FlibHndl, long *length, char *data);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| length | in/out |
Specify the pointer of the variable to the character length of NC data. After reading, the number of characters actually read is set in this variable again. This function returns EW_LENGTH if '*length' is less than 256. |
| data | out |
Specify the pointer to the buffer to be read. |
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_RESET |
The data to read is nothing. Call the cnc_upend4 function. |
||||||
| EW_FUNC |
|
||||||
| EW_LENGTH |
|
||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
||||||
| EW_PROT |
Tape memory is read-protected by the CNC parameter setting(O8000-/O9000- protection, encoding). See Description about the timing of error. |
||||||
| EW_BUFFER |
Retry because the buffer is empty. See Description about the timing of error. |
program\cnc_upstart
Notifies the start of uploading NC program to the internal logic of the Data window library.
In Series 16/18,16i/18i, 0i-F, 30i, Power Mate i, t is possible to use this function for
the program number 8 digits, however it is necessary to switch API to
the one for the program number 8 digits.
(This function must be executed before cnc_upload /
cnc_cupload.)
In Series 15i, it is necessary to switch API to the one for the program number 8 digits.
See Program number 8 digits for details.
PROTOTYPE
FWLIBAPI short WINAPI cnc_upstart(unsigned short FlibHndl, short number);For the program number 8 digits : FWLIBAPI short WINAPI cnc_upstart(unsigned short FlibHndl,long number);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. |
| number | in |
Specify program number |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
Unavailable This application is not customized for the program number 8 digits. See "Library handle" for details. |
| EW_BUSY |
Series15/15i
|
| EW_DATA |
Program(number) is not found. |
program\cnc_upstart3
Notifies the start of uploading NC data (NC program, tool offset, etc.) to the internal logic of the
Data window library.
cnc_upload3 function and
cnc_upend3 function will return EW_FUNC
in case that cnc_upstart3 function is not executed.
A basic procedure for upload is shown below.
In case of uploading NC programs, specify the upload start program number to 's_number'
and the upload end program number to 'e_number'.
In case of uploading only one program, specify its program number as s_number = e_number.
(This function must be executed before cnc_upload3.)
And in case of uploading all program, specify -9999 to 's_number' and 0 to 'e_number'.
PROTOTYPE
FWLIBAPI short WINAPI cnc_upstart3(unsigned short FlibHndl, short type, long s_number, long e_number);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||
| type | in |
Specify the kind of the data.
|
||||||||||||||||||||||||
| s_number | in |
Specify the start program number to read. |
||||||||||||||||||||||||
| e_number | in |
Specify the end program number to read. |
ERRORS
| Code | Description | |||
|---|---|---|---|---|
| EW_BUSY |
Series 15i
|
|||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
|||
| EW_ATTRIB |
Data type (type) is illegal. |
|||
| EW_NOOPT |
Series 15i
|
|||
| EW_PARAM |
|
|||
| EW_MODE |
|
|||
| EW_REJECT |
|
|||
| EW_ALARM |
|
|||
| EW_PASSWD |
|
program\cnc_upstart4
Notifies the start of uploading NC data (NC program, tool offset, etc.) to the internal logic of the
Data window library.
In case of upload for NC programs, a source file or a destination folder can be specified.
cnc_upload4 function and
cnc_upend4 function will return EW_FUNC
in case that cnc_upstart4 function is not executed.
A basic procedure for upload is shown below.
(This function must be executed before cnc_upload4.)
PROTOTYPE
FWLIBAPI short WINAPI cnc_upstart4(unsigned short FlibHndl, short type, char* file_name);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||
| type | in |
Specify the kind of the data.
|
|||||||||||||||||||||||||||
| file_name | in |
Specify a source file name or a source folder name for upload. (The maximum length of the character string is 241 and the string should be included by NULL('\0') terminate character.) In case of a file name only, not a full path name, the file in a current folder is read. In case of a folder name, all programs in the folder are read, In case of NULL, all programs in a current folder are read. Example :It is available when type = 0. Please refer to "General Description (Specifying the folder and file name for FS30i, 0i-D/F and PMi-A.)" for details of the folder and file name. |
ERRORS
| Code | Description | |||
|---|---|---|---|---|
| EW_BUSY |
|
|||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerrfunction. The following detail status will be set onto the member, err_no of ODBERR structure.
|
|||
| EW_ATTRIB |
Data type (type) is illegal. |
|||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
|||
| EW_NOOPT |
In case of custom macro variables, work zero offset or pitch error compensation data, this function needs the option for the target data. |
program\cnc_verify
Outputs NC program to be compared with already registered one to CNC.
When the data processing on the CNC side is delayed and the data cannot be transferred,
this function waits until it can be transferred.
Because importance is attached to the speed of data transfer to the CNC, in general, return of errors(EW_DATA, EW_OVRFLOW, etc.) may be delayed.
Refer to the description of cnc_download function for the format of output data.
If an application cannot wait,
use the cnc_cverify function.
Namely, an error status may refrect the result caused by the previously executed cnc_verify callings.
And the error status for some cnc_verify callings just before the finish of verifying is returned by cnc_vrfend function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_verify(unsigned short FlibHndl, char *data, short number);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| data | in |
Specify the top address of NC program data. |
| number | in |
Specify the number of characters of NC program data. (1 - 256) |
ERRORS
| Code | Description |
|---|---|
| EW_RESET |
CNC required to stop verification. 'RESET or STOP' was pushed.(Series 15/15i) Call the cnc_vrfend function.
CNC required to stop verification. Call the cnc_vrfend function. |
| EW_FUNC |
|
| EW_LENGTH |
Length of data block(number) exceeds 256 bytes. |
| EW_DATA |
|
program\cnc_verify4
Outputs NC program to be compared with already registered one to CNC.
This function outputs the characters of NC program as long as it is specified by '*length'.
In case that this function cannot output at least one character, it returns EW_BUFFER,
so again call this function with the same arguments.
Because importance is attached to the speed of data transfer to the CNC, in general,
return of errors(EW_DATA, etc.) may be delayed. Namely, an error status
may refrect the result caused by the previously executed cnc_verify4 callings.
However, if there is no room to store the specified number of character, this function stores
the characters as many as possible to fill the buffer and then sets '*length' with the
real number of characters which are stored in the buffer.
And the error status for some cnc_vreify4
callings just before the finish of downloading is returned by
cnc_vrfend4 function.
Refer to the description of cnc_download4 function for the format of output data.
PROTOTYPE
FWLIBAPI short WINAPI cnc_verify4(unsigned short FlibHndl, long *length, char *data);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| length | in/out |
Specify the ponter of the variable to the character length of NC data. This function returns EW_LENGTH if '*length' has the value of zero or negative. |
| data | out |
Specify the ponter of the variable to NC data. |
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_RESET |
CNC required to stop verifiing. Call the cnc_vrfend4 function. |
|||||||||
| EW_FUNC |
|
|||||||||
| EW_LENGTH |
|
|||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
|||||||||
| EW_BUFFER |
Retry because the buffer is full. See Description about the timing of error. |
|||||||||
| EW_REJECT |
Downloading is disable in the current CNC status. (Machining, resetting, mode changing) See Description about the timing of error. |
|||||||||
| EW_ALARM |
Alarm has occurred while downloading. See Description about the timing of error. |
program\cnc_vrfend
Notifies the end of verification of NC program to CNC.
There are cases where errors(EW_DATA,EW_OVRFLOW, etc.) during execution
of verifying NC program are returned by this function.
Further, this function does not return until the verification
of the output data by cnc_verify(cnc_cverify) is completed.
(This function must be executed after cnc_verify/cnc_cverify.)
PROTOTYPE
FWLIBAPI short WINAPI cnc_vrfend(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
| EW_DATA |
See 'Description' about the generation timing. |
program\cnc_vrfend4
Notifies the end of verification of NC program to CNC.
There are cases where errors(EW_DATA, etc.) during execution of verifying NC program are returned by this function.
Further, this function does not return until the verification of the
output data by cnc_verify4 is completed.
(This function must be executed after cnc_verify4.)
PROTOTYPE
FWLIBAPI short WINAPI cnc_vrfend4(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_FUNC |
|
|||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
|||||||||
| EW_REJECT |
Downloading is disable in the current CNC status. (Machining, resetting, mode changing) See Description about the timing of error. |
|||||||||
| EW_ALARM |
Alarm has occurred while downloading. See Description about the timing of error. |
program\cnc_vrfstart
Requests CNC to start verification of NC program. It is possible to compare already registered NC program in CNC and a program which is output by the application program.
(This function must be executed before cnc_verify/cnc_cverify.)
The procedure of verify is as follows.
PROTOTYPE
FWLIBAPI short WINAPI cnc_vrfstart(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
ERRORS
| Code | Description |
|---|---|
| EW_BUSY |
Series 15i
|
| EW_FUNC |
|
program\cnc_vrfstart4
Requests CNC to start verification of NC program.
(This function must be executed before cnc_verify4)
cnc_verify4 function and
cnc_vrfend4 function will return
EW_FUNC in case that cnc_vrfstart4 function is not executed.
The procedure of verify is as follows.
PROTOTYPE
FWLIBAPI short WINAPI cnc_vrfstart4(unsigned short FlibHndl, char* dir_name);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| dir_name | in |
Specify a destination folder name for verifying. (The maximum length of the character string is 241 and the string should be included by NULL('\0') terminate character.) Example : "//CNC_MEM/USER/PATH1/"Please refer to "General Description (Specifying the folder and file name for FS30i, 0i-D/F and PMi-A.)" for details of the folder name. |
ERRORS
| Code | Description | |||
|---|---|---|---|---|
| EW_BUSY |
CNC does another program edit operation. |
|||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
|||
| EW_ALARM |
|
program\cnc_wractpt
Sets the execution pointer of the NC program for the MDI or Memory operation.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wractpt(unsigned short FlibHndl, long prog_no, short type, long *blk_no);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||
| prog_no | in |
Program number You can set the pointer for the current selected program. If the selected program is called by calling macro or sub-program (that is a nested program), you also can set the pointer to it(16i/18i/21i/30i/31i/32i/0i-D/F, PMi-A only). |
|||||||||||||||||||||||||||
| type | in |
Type of the execution pointer you will set.
|
|||||||||||||||||||||||||||
| blk_no | in/out |
Pointer to the long type variable holding the block number to set. In case of 30i, 0i-D/F and PMi-A, when the block number which is not present is specified in MDI program, the cursor moves to the last line.
|
ERRORS
| Code | Description |
|---|---|
| EW_ATTRIB |
Type is illegal. |
| EW_DATA |
|
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_MODE |
|
| EW_REJECT |
|
program\cnc_wrmdipntr
Specify the execution starting pointer for MDI operation.
(It is impossible to operate the execution pointer directly)
Register the MDI program previously according to the cnc_wrmdiprog function before executing this function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrmdipntr(unsigned short FlibHndl, long crntpntr);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| crntpntr | in |
Specify the block pointer to execute first. |
ERRORS
| Code | Description |
|---|---|
| EW_DATA |
The specification of the block point to execute first(crntpntr) is illegal. |
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_MODE |
Set CNC mode to MDI. |
| EW_REJECT |
|
program\cnc_wrmdiprog
Outputs NC program for MDI operation to CNC.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrmdiprog(unsigned short FlibHndl, short length, char *data);
ARGUMENTS
| Name | Direction | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||
| length | in |
Specify the number of characters of NC program to be written.
|
||||||||||||
| data | out |
Specify the top address of NC program data. |
||||||||||||
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||
| length | in |
Specify the number of characters of NC program to be written. |
||||||||||||
| data | out |
Specify the top address of NC program data. |
ERRORS
| Code | Description |
|---|---|
| EW_BUSY |
Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
|
| EW_LENGTH |
Length of the block (length) is illegal. |
| EW_DATA |
A character which is unavailable for CNC program is detected. |
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_MODE |
Set CNC mode to MDI. |
| EW_REJECT |
MDI operation in progress
|
program\cnc_wrpdf_attr
Changes the attribute of folder or file under the specified folder.
Execution of this function is kept waiting when CNC is in editing(including the background edit state).
When the specified folder is selected as the current folder, the attribute cannot be changed.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrpdf_attr(unsigned short FlibHndl, char *file_path,IDBPDFTDIR *pdf_tdir);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||
| file_path | in |
String length can be up to 242 characters. The string must be NULL terminated. In case of folder name, place "/" at the end of string. If there is no "/", it is regarded as the string for file. Please refer to "General Description (Specifying the folder and file name for FS30i, 0i-D/F and PMi-A.)" for details of the folder name. |
|||||||||||||||||||||||||||||||||||||
| pdf_tdir | in |
Specify the pointer for the IDBPDFTDIR structure that stores the information
about folder/file to be changed.
typedef struct idbpdftdir {
unsigned long slct; /* setting selection */
unsigned long attr; /* setting attribute */
} IDBPDFTDIR;
|
ERRORS
| Code | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_ATTRIB |
When the option of "Protection of Data at Eight Levels" was invalid, the attribute for "Protection of Data at Eight Levels" was specified for argument slct. ("1" was set in either of slct(#8-31).) |
|||||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
|||||||||||||||
| EW_PROT |
Specified file/folder is prohibited from writing. Or, it is protected by the protection level. |
|||||||||||||||
| EW_REJECT |
CNC is on execution. |
program\cnc_wrpdf_curdir
Sets the current folder.
Execution of this function is kept waiting when CNC is in editing(including the background edit state).
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrpdf_curdir(unsigned short FlibHndl, short dir_kind, char *dir_name);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| dir_kind | in |
Specify the kind of current folder to be set.
|
||||||
| dir_name | in |
Specify the pointer for the string that stores "Current drive + folder". |
ERRORS
| Code | Description |
|---|---|
| EW_ATTRIB |
The dir_kind is invalid. |
| EW_DATA |
The folder specified by (dir_name) does not exist. |
| EW_REJECT |
|
program\cnc_wrpdf_line
Writes the NC program by line basis.
You cannot change a program file name in the top of the program. The conditions of the function about CNC mode and the kind of program are as follows.
If you try to change it, you get EW_DATA ad the return code.
O: Available / ×: Not available (The return code is EW_MODE)
EDIT mode
MDI mode
Other mode
MDI program
×
O
×
Selected program
O
×
×
Not selected program
O
O
O
If you have the playback option, TJOG/THND mode is the same as EDIT.
This function works normally if OP signal is 1 but STL signal is 0 (for example, feed hold stopping, single block stopping, etc).
When you use this function for the MDI program or the selected program in the following situations, the execution pointer goes to the top of line specified by line_no.
- MDI program in MDI mode.
- Selected program in EDIT mode.
- Selected program in TJOG/THND mode with the playback option.
When the reset processing is executed in CNC, the processing interrupts can be selected according to the parameter LES(No.11353#3).
Inc case of parameter LES(No.11353#3)=0 : The process is not interrupted.
Inc case of parameter LES(No.11353#3)=1 : The process is interrupted.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrpdf_line(unsigned short FlibHndl, char *prog_name, unsigned long line_no,
char *prog_data, unsigned long data_len);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| prog_name | in |
Program path makes of the "drive name","path name" and "file name". |
| line_no | in |
Specify the line number to write. |
| prog_data | in |
Specify the pointer to the buffer holding the program text.
|
| data_len | in |
Specify the size of character to write. |
ERRORS
| Code | Description | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_BUSY |
CNC is searching the program text right now. |
|||||||||||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
|||||||||||||||||||||
| EW_NOOPT |
The extended driver/library function is necessary. |
|||||||||||||||||||||
| EW_PROT |
CNC parameter is a state of write-protection(O8000-/O9000- protection, encoding). |
|||||||||||||||||||||
| EW_OVRFLOW |
It is lack of free area in CNC memory. Make enough free area in CNC memory. |
|||||||||||||||||||||
| EW_MODE |
|
|||||||||||||||||||||
| EW_REJECT |
MDI edit or Background edit processing in CNC side. |
program\cnc_wrprogline
Writes the NC program by line basis.
When you specify the same number("Oxxxx") in the top of the program, this function deletes the character after O number, but doesn't delete O number. The conditions of the function about CNC mode and the kind of program are as follows.
When you specify the different number("Oxxxx") in the top of the program, you get EW_DATA ad the return code.
O: Available / ×: Not available (The return code is EW_MODE)
EDIT mode
MDI mode
Other mode
MDI program
×
O
×
Selected program
O
×
×
Not selected program
O
O
O
If you have the playback option, TJOG/THND mode is the same as EDIT.
This function works normally if OP signal is 1 but STL signal is 0 (for example, feed hold stopping, single block stopping, etc).
When you use this function for the MDI program or the selected program in the following situations, the execution pointer goes to the top of line specified by line_no.
- MDI program in MDI mode.
- Selected program in EDIT mode.
- Selected program in TJOG/THND mode with the playback option.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrprogline(unsigned short FlibHndl, long prog_no, unsigned long line_no, char *prog_data, unsigned long data_len);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| prog_no | in |
Specify the program number to write. |
| line_no | in |
Specify the line number to write. |
| prog_data | in |
Specify the pointer to the buffer holding the program text.
|
| data_len | in |
Specify the size of character to write. |
ERRORS
| Code | Description | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_BUSY |
|
||||||||||||||||||||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
||||||||||||||||||||||||||||||
| EW_NOOPT |
The extended driver/library function is necessary. |
||||||||||||||||||||||||||||||
| EW_MODE |
|
||||||||||||||||||||||||||||||
| EW_PROT |
CNC parameter is a state of write-protection(O8000-/O9000- protection, encoding). Protect KEY signal was ON. (Writing the MDI program is excluded)(except 30i/31i/32i, 0i-D/F, PMi-A) |
||||||||||||||||||||||||||||||
| EW_REJECT |
The specified program is running.
|
||||||||||||||||||||||||||||||
| EW_OVRFLOW |
It is lack of free area in CNC memory. Make enough free area in CNC memory. |
punch\cnc_rd1punchtl_ex
Various tool registration data (tool number, tool punch frequency, and tool shape, etc.) corresponding to the specified tool registration number is read.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rd1punchtl_ex(unsigned short FlibHndl, IODBPUNCH1_EX *buf);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| buf | in/out |
Pointer for returning various tool registration data (tool number, tool punch frequency, and tool shape, etc.) to a iodbpunch1_ex structure.
typedef struct iodbpunch1_ex {
unsigned short number ; /* Data number(N) */
unsigned short attr ; /* Data attribute(M) */
union {
unsigned short u2data ; /* Unsigned 2 bite */
short s2data ; /* Signed 2 bite */
unsigned long u4data ; /* Unsigned 4 bite */
long s4data ; /* Signed 4 bite */
unsigned long u8data[2] ; /* Unsigned 8 bite */
} u ;
short decimal ; /* Decimal places */
short reserve ; /* Reserve */
} IODBPUNCH1_EX ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 0i-PD/PF, 30i/31i-LB, 30i/31i-PB. |
| EW_NUMBER |
Start number(number) is wrong. |
| EW_ATTRIB |
data attribute(attr) is wrong. |
| EW_NOOPT |
The extended driver/library function is necessary. It is necessary to set Punch press function option and Parameter ALA(No.16242#0).(30i/31i-LB only) |
punch\cnc_rd2punchtl_ex
Reads each tool registration data (registration number, tool punch frequency, and tool shape, etc.)corresponding to the tool registration number which specified.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rd2punchtl_ex(unsigned short FlibHndl, IODBPUNCH2_EX *buf);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| buf | in/out |
Specifies a pointer of the IODBPUNCH2_EX structure which returns the various of tool registration data (the tool number, the tool punch frequency, and the tool shape, etc.).
typedef struct iodbpunch2_ex {
unsigned long number ; /* Data number(N) */
unsigned short attr ; /* Data attribute(M) */
union {
unsigned short u2data ; /* Unsigned 2 bite */
short s2data ; /* Signed 2 bite */
unsigned long u4data ; /* Unsigned 4 bite */
long s4data ; /* Signed 4 bite */
unsigned long u8data[2] ; /* Unsigned 8 bite */
} u ;
short decimal ; /* Decimal places */
short reserve ; /* Reserve */
} IODBPUNCH2_EX ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 0i-PD/PF, 30i/31i-LB, 30i/31i-PB. |
| EW_NUMBER |
Start number(number) is wrong. |
| EW_ATTRIB |
data attribute(attr) is wrong. |
| EW_NOOPT |
The extended driver/library function is necessary. It is necessary to set Punch press function option and Parameter ALA(No.16242#0).(30i/31i-LB only) |
punch\cnc_rdacttlzone
Reads the actual tool zone data number and its data.
The number and data are stored in each member of the ODBACTTLZN structure(user define type).
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdacttlzone(unsigned short FlibHndl, ODBACTTLZN *acttlzn);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| acttlzn | out |
Pointer to the ODBACTTLZN structure including the actual number and data for the tool zone. The ODBACTTLZN structure is as follows.
typedef struct odbacttlzn {
short act_no; /* Actual tool zone data number */
long data[2]; /* Actual tool zone data */
} ODBACTTLZN ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 0i-PD/PF, 16i/18i-P, 30i/31i-LB, 30i/31i-PB. |
| EW_NOOPT |
The safety zone check function and the extended driver/library function are necessary. It is necessary to set Punch press function option and Parameter ALA(No.16242#0).(30i/31i-LB only) |
punch\cnc_rdmultitldt
The data is stored in each member of the IODBMLTTL structure( user define type ).
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdmultitldt(unsigned short FlibHndl, short s_no, short *number, IODBMLTTL *mlttl);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. |
||||||||||||||||||||||||||||||||||||||||||||||
| s_no | in |
Specify the start tool registration number. 1,..,(maximum tool registration number) |
||||||||||||||||||||||||||||||||||||||||||||||
| number | in/out |
Pointer to the number of multiple tool data. |
||||||||||||||||||||||||||||||||||||||||||||||
| mlttl | out |
Pointer to the IODBMLTTL structure including the multiple tool data.
・Series 16i/18i-P
typedef struct iodbmlttl {
short slct; /* Flag of valid data */
short m_tl_no; /* Sub-tool number */
long m_tl_radius;/* Radius of multiple tool */
long m_tl_angle; /* Angle of multiple tool */
long x_axis_ofs; /* X-axis offset */
long y_axis_ofs; /* Y-axis offset */
char tl_shape; /* Tool shape(C) */
long tl_size_i; /* Tool size(I) */
long tl_size_j; /* Tool size(J) */
long tl_angle; /* Tool angle(K) */
long reserve[7]; /* (reserve) */
} IODBMLTTL ;
・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB
typedef struct iodbmlttl {
short slct; /* Flag of valid data */
short m_tl_no; /* Sub-tool number */
long m_tl_radius; /* Radius of multiple tool */
long m_tl_angle; /* Angle of multiple tool */
long x_axis_ofs; /* X-axis offset */
long y_axis_ofs; /* Y-axis offset */
char tl_shape; /* Tool shape(C) */
long tl_size_i; /* Tool size(I) */
long tl_size_j; /* Tool size(J) */
long tl_angle; /* Tool angle(K) */
char m_radius_dec; /* Decimals places */
char m_angle_dec; /* Decimals places */
char x_axis_dec; /* Decimals places */
char y_axis_dec; /* Decimals places */
char tl_size_i_dec; /* Decimals places */
char tl_size_j_dec; /* Decimals places */
char tl_angle_dec; /* Decimals places */
char reserve; /* (reserve) */
long reserves[5]; /* (reserve) */
} IODBMLTTL ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 0i-PD/PF, 16i/18i-P, 30i/31i-LB, 30i/31i-PB. |
| EW_LENGTH |
Number of data(number) is wrong. |
| EW_NUMBER |
Start number(s_no) is wrong. |
| EW_NOOPT |
The multiple tool function and the extended driver/library function are necessary. It is necessary to set Punch press function option and Parameter ALA(No.16242#0).(30i/31i-LB only) |
punch\cnc_rdsafetyzone
The data is stored in each member of the IODBSAFE structure( user define type ).
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdsafetyzone(unsigned short FlibHndl, short s_no, short *number, IODBSAFE *safe);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. |
|||||||||||||||||||||||||||
| s_no | in |
Specify the start safety zone data number. (1,..,4) |
|||||||||||||||||||||||||||
| number | in/out |
Pointer to the number of safety zone data. |
|||||||||||||||||||||||||||
| safe | out |
Pointer to the IODBSAFE structure including the safety zone data.
typedef struct iodbsafe {
short slct; /* Flag of valid data */
long data[3]; /* Safety zone data */
} IODBSAFE ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 0i-PD/PF, 16i/18i-P, 30i/31i-LB, 30i/31i-PB. |
| EW_LENGTH |
Number of data(number) is wrong. |
| EW_NUMBER |
Start number(s_no) is wrong. |
| EW_NOOPT |
The safety zone check function and the extended driver/library function are necessary. It is necessary to set Punch press function option and Parameter ALA(No.16242#0).(30i/31i-LB only) |
punch\cnc_rdsetzone
Reads the number of safety zone which is set automatically.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdsetzone(unsigned short FlibHndl, short *setzone);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| setzone | out |
Pointer to the variable for the number of automatic setting zone. (0,..,4) |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 0i-PD/PF, 16i/18i-P, 30i/31i-LB, 30i/31i-PB. |
| EW_NOOPT |
The safety zone check function and the extended driver/library function are necessary. It is necessary to set Punch press function option and Parameter ALA(No.16242#0).(30i/31i-LB only) |
punch\cnc_rdtlctldata
Reads the tool control data.
The data is stored in each member of the IODBTLCTL structure( user define type ).
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdtlctldata(unsigned short FlibHndl, IODBTLCTL *tlctl);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. |
||||||||||||||||||||||||||||||||||
| tlctl | out |
Pointer to the IODBTLCTL structure including the tool control data.
・Series 16i/18i-P
typedef struct iodbtlctl {
short slct; /* Flag of valid data */
short used_tool; /* Number of used tool */
short turret_indx; /* Number of turret index */
long zero_tl_no; /* Zero point tool number */
long t_axis_move; /* Turret axis movement */
long total_punch[2];/* Total number of punch operation*/
short reserve[11]; /* (reserve) */
} IODBTLCTL ;
・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB
typedef struct iodbtlctl {
short slct; /* Flag of valid data */
short used_tool; /* Number of used tool */
short turret_indx; /* Number of turret index */
long zero_tl_no; /* Zero point tool number */
long t_axis_move; /* Turret axis movement */
long total_punch[2]; /* Total number of punch operation */
char t_axis_dec; /* Decimals places */
char reserve; /* (reserve) */
short reserves[10]; /* (reserve) */
} IODBTLCTL ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 0i-PD/PF, 16i/18i-P, 30i/31i-LB, 30i/31i-PB. |
| EW_NOOPT |
The extended driver/library function is necessary. It is necessary to set Punch press function option and Parameter ALA(No.16242#0).(30i/31i-LB only) |
punch\cnc_rdtooldata
The data is stored in each member of the IODBTLDT structure( user define type ).
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdtooldata(unsigned short FlibHndl, short s_no, short *number, IODBTLDT *tldt);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| s_no | in |
Specify the start tool registration number. 1,..,(maximum tool registration number) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| number | in/out |
Pointer to the number of tool data. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tldt | out |
Pointer to the IODBTLDT structure including the tool data.
・Series 16i/18i-P
typedef struct iodbtldt {
short slct; /* Flag of valid data */
long tool_no; /* Tool number */
long x_axis_ofs; /* X-axis offset */
long y_axis_ofs; /* Y-axis offset */
long turret_pos; /* Turret position */
long chg_tl_no; /* Tool number to be changed */
long punch_count;/* Number of punch operation */
long tool_life; /* Tool life */
long m_tl_radius;/* Radius of multiple tool */
long m_tl_angle; /* Angle of multiple tool */
char tl_shape; /* Tool shape(C) */
long tl_size_i; /* Tool size(I) */
long tl_size_j; /* Tool size(J) */
long tl_angle; /* Tool angle(K) */
long reserve[3]; /* (reserve) */
} IODBTLDT ;
・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB
typedef struct iodbtldt {
short slct; /* Flag of valid data */
long tool_no; /* Tool number */
long x_axis_ofs; /* X-axis offset */
long y_axis_ofs; /* Y-axis offset */
long turret_pos; /* Turret position */
long chg_tl_no; /* Tool number to be changed */
long punch_count; /* Number of punch operation */
long tool_life; /* Tool life */
long m_tl_radius; /* Radius of multiple tool */
long m_tl_angle; /* Angle of multiple tool */
char tl_shape; /* Tool shape(C) */
long tl_size_i; /* Tool size(I) */
long tl_size_j; /* Tool size(J) */
long tl_angle; /* Tool angle(K) */
char x_axis_dec; /* Decimals places */
char y_axis_dec; /* Decimals places */
char turret_dec; /* Decimals places */
char m_radius_dec; /* Decimals places */
char m_angle_dec; /* Decimals places */
char tl_size_i_dec;/* Decimals places */
char tl_size_j_dec;/* Decimals places */
char tl_angle_dec; /* Decimals places */
short reserve[2]; /* (reserve) */
} IODBTLDT ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 0i-PD/PF, 16i/18i-P, 30i/31i-LB, 30i/31i-PB. |
| EW_LENGTH |
Number of data(number) is wrong. |
| EW_NUMBER |
Start number(s_no) is wrong. |
| EW_NOOPT |
The extended driver/library function is necessary. It is necessary to set Punch press function option and Parameter ALA(No.16242#0).(30i/31i-LB only) |
punch\cnc_rdtoolinfo
The data is stored in each member of the ODBPTLINF structure( user define type ).
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdtoolinfo(unsigned short FlibHndl, ODBPTLINF *tlinf);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. |
||||||||||||||||||||||||||||||||||||||||||||||||||||
| tlinf | out |
Pointer to the ODBPTLINF structure including the tool information.
typedef struct odbptlinf {
short tld_max; /* Maximun tool registration number of the tool data */
short mlt_max; /* Maximun tool registration number of the multiple tool data */
short reserve /* (reserve) */
short tld_size[16] /* Size of the tool data */
short mlt_size[16] /* Size of the multiple tool data */
short reserves[16] /* (reserve) */
} ODBPTLINF ;
See the "OPERATOR'S MANUAL" and the "PARAMETER MANUAL" of CNC for details of the tool data setting function. |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 0i-PD/PF, 16i/18i-P, 30i/31i-LB, 30i/31i-PB. |
| EW_NOOPT |
The extended driver/library function are necessary. It is necessary to set Punch press function option and Parameter ALA(No.16242#0).(30i/31i-LB only) |
punch\cnc_rdtoolzone
The data is stored in each member of the IODBTLZN structure( user define type ).
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdtoolzone(unsigned short FlibHndl, short s_no, short *number, IODBTLZN *tlzone);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. |
|||||||||||||||
| s_no | in |
Specify the start tool zone data number. (1,..,12) |
|||||||||||||||
| number | in/out |
Pointer to the number of tool zone data. |
|||||||||||||||
| tlzone | out |
Pointer to the IODBTLZN structure including the tool zone data.
typedef struct iodbtlzn {
short slct; /* Flag of valid data */
long data[2]; /* Tool zone data */
} IODBTLZN ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 0i-PD/PF, 16i/18i-P, 30i/31i-LB, 30i/31i-PB. |
| EW_LENGTH |
Number of data(number) is wrong. |
| EW_NUMBER |
Start number(s_no) is wrong. |
| EW_NOOPT |
The safety zone check function and the extended driver/library function are necessary. It is necessary to set Punch press function option and Parameter ALA(No.16242#0).(30i/31i-LB only) |
punch\cnc_wrmultitldt
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrmultitldt(unsigned short FlibHndl, short s_no, short *number, IODBMLTTL *mlttl);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. |
||||||||||||||||||||||||||||||||||||||||||||||
| s_no | in |
Specify the start tool registration number. 1,..,(maximum tool registration number) |
||||||||||||||||||||||||||||||||||||||||||||||
| number | in/out |
Pointer to the number of multiple tool data. |
||||||||||||||||||||||||||||||||||||||||||||||
| mlttl | in |
Pointer to the IODBMLTTL structure including the multiple tool data.
・Series 16i/18i-P
typedef struct iodbmlttl {
short slct; /* Flag of data selection */
short m_tl_no; /* Sub-tool number */
long m_tl_radius;/* Radius of multiple tool */
long m_tl_angle; /* Angle of multiple tool */
long x_axis_ofs; /* X-axis offset */
long y_axis_ofs; /* Y-axis offset */
char tl_shape; /* Tool shape(C) */
long tl_size_i; /* Tool size(I) */
long tl_size_j; /* Tool size(J) */
long tl_angle; /* Tool angle(K) */
long reserve[7]; /* (reserve) */
} IODBMLTTL ;
・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB
typedef struct iodbmlttl {
short slct; /* Flag of data selection */
short m_tl_no; /* Sub-tool number */
long m_tl_radius; /* Radius of multiple tool */
long m_tl_angle; /* Angle of multiple tool */
long x_axis_ofs; /* X-axis offset */
long y_axis_ofs; /* Y-axis offset */
char tl_shape; /* Tool shape(C) */
long tl_size_i; /* Tool size(I) */
long tl_size_j; /* Tool size(J) */
long tl_angle; /* Tool angle(K) */
char m_radius_dec; /* Decimals places */
char m_angle_dec; /* Decimals places */
char x_axis_dec; /* Decimals places */
char y_axis_dec; /* Decimals places */
char tl_size_i_dec; /* Decimals places */
char tl_size_j_dec; /* Decimals places */
char tl_angle_dec; /* Decimals places */
char reserve; /* (reserve) */
long reserves[5]; /* (reserve) */
} IODBMLTTL ;
|
ERRORS
| Code | Description | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_FUNC |
This function cannot be used except 0i-PD/PF, 16i/18i-P, 30i/31i-LB, 30i/31i-PB. |
|||||||||||||||||||||||||||
| EW_LENGTH |
Number of data(number) is wrong. |
|||||||||||||||||||||||||||
| EW_NUMBER |
Start number(s_no) is wrong. |
|||||||||||||||||||||||||||
| EW_DATA |
The multiple tool data is wrong. In order to get more information for this err_no(nErr_no) return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure (nErr_no of ODBERR user define type.).
|
|||||||||||||||||||||||||||
| EW_NOOPT |
The multiple tool function and the extended driver/library function are necessary. It is necessary to set Punch press function option and Parameter ALA(No.16242#0).(30i/31i-LB only) |
punch\cnc_wrpunchtl_ex
Writes each tool registration data (registration number, tool punch frequency, and tool shape, etc.)corresponding to the tool registration number which specified.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrpunchtl_ex(unsigned short FlibHndl, short len, IODBPUNCH1_EX *buf);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| len | in |
Specifies size of data to write (= 8 + (one of 2, 4 and 8)). |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| buf | in/out |
Specifies a pointer of the IODBPUNCH1_EX structure which sets the various of tool registration data (the tool number, the tool punch frequency, and the tool shape, etc.).
typedef struct iodbpunch1_ex {
unsigned short number ; /* Data number(N) */
unsigned short attr ; /* Data attribute(M) */
union {
unsigned short u2data ; /* Unsigned 2 bite */
short s2data ; /* Signed 2 bite */
unsigned long u4data ; /* Unsigned 4 bite */
long s4data ; /* Signed 4 bite */
unsigned long u8data[2] ; /* Unsigned 8 bite */
} u ;
short decimal ; /* Decimal places */
short reserve ; /* Reserve */
} IODBPUNCH1_EX ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 0i-PD/PF, 30i/31i-LB, 30i/31i-PB. |
| EW_NUMBER |
Start number(number) is wrong. |
| EW_ATTRIB |
data attribute(attr) is wrong. |
| EW_NOOPT |
The extended driver/library function is necessary. It is necessary to set Punch press function option and Parameter ALA(No.16242#0).(30i/31i-LB only) |
punch\cnc_wrsafetyzone
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrsafetyzone(unsigned short FlibHndl, short s_no, short *number, IODBSAFE *safe);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. |
|||||||||||||||||||||||||||
| s_no | in |
Specify the start safety zone data number. (1,..,4) |
|||||||||||||||||||||||||||
| number | in/out |
Pointer to the number of safety zone data. |
|||||||||||||||||||||||||||
| safe | in |
Pointer to the IODBSAFE structure including the safety zone data.
typedef struct iodbsafe {
short slct; /* Flag of data selection */
long data[3]; /* Safety zone data */
} IODBSAFE ;
|
ERRORS
| Code | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_FUNC |
This function cannot be used except 0i-PD/PF, 16i/18i-P, 30i/31i-LB, 30i/31i-PB. |
||||||||||||
| EW_LENGTH |
Number of data(number) is wrong. |
||||||||||||
| EW_NUMBER |
Start number(s_no) is wrong. |
||||||||||||
| EW_DATA |
In order to get more information for this err_no(nErr_no) return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure (nErr_no of ODBERR user define type.).
|
||||||||||||
| EW_NOOPT |
The safety zone check function and the extended driver/library function are necessary. It is necessary to set Punch press function option and Parameter ALA(No.16242#0).(30i/31i-LB only) |
punch\cnc_wrsetzone
Writes the number of safety zone which is set automatically.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrsetzone(unsigned short FlibHndl, short setzone);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| setzone | in |
Specify the number of automatic setting zone. (0,..,4) |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function cannot be used except 0i-PD/PF, 16i/18i-P, 30i/31i-LB, 30i/31i-PB. |
| EW_DATA |
The number of automatic setting zone(setzone) is wrong. |
| EW_NOOPT |
The safety zone check function and the extended driver/library function are necessary. It is necessary to set Punch press function option and Parameter ALA(No.16242#0).(30i/31i-LB only) |
punch\cnc_wrtlctldata
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrtlctldata(unsigned short FlibHndl, IODBTLCTL *tlctl);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. |
||||||||||||||||||||||||||||||||||
| tlctl | in |
Pointer to the IODBTLCTL structure including the tool control data.
・Series 16i/18i-P
typedef struct iodbtlctl {
short slct; /* Flag of data selection */
short used_tool; /* Number of used tool */
short turret_indx; /* Number of turret index */
long zero_tl_no; /* Zero point tool number */
long t_axis_move; /* Turret axis movement */
long total_punch[2];/* Total number of punch operation*/
short reserve[11]; /* (reserve) */
} IODBTLCTL ;
・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB
typedef struct iodbtlctl {
short slct; /* Flag of data selection */
short used_tool; /* Number of used tool */
short turret_indx; /* Number of turret index */
long zero_tl_no; /* Zero point tool number */
long t_axis_move; /* Turret axis movement */
long total_punch[2];/* Total number of punch operation */
char t_axis_dec; /* Decimals places */
char reserve; /* (reserve) */
short reserves[10]; /* (reserve) */
} IODBTLCTL ;
|
ERRORS
| Code | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_FUNC |
This function cannot be used except 0i-PD/PF, 16i/18i-P, 30i/31i-LB, 30i/31i-PB. |
|||||||||||||||
| EW_DATA |
The tool control data is wrong. In order to get more information for this err_no(nErr_no) return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure (nErr_no of ODBERR user define type.).
|
|||||||||||||||
| EW_NOOPT |
The extended driver/library function is necessary. It is necessary to set Punch press function option and Parameter ALA(No.16242#0).(30i/31i-LB only) |
punch\cnc_wrtooldata
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrtooldata(unsigned short FlibHndl, short s_no, short *number, IODBTLDT *tldt);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| s_no | in |
Specify the start tool registration number. 1,..,(maximum tool registration number) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| number | in/out |
Pointer to the number of tool data. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tldt | in |
Pointer to the IODBTLDT structure including the tool data.
・Series 16i/18i-P
typedef struct iodbtldt {
short slct; /* Flag of data selection */
long tool_no; /* Tool number */
long x_axis_ofs; /* X-axis offset */
long y_axis_ofs; /* Y-axis offset */
long turret_pos; /* Turret position */
long chg_tl_no; /* Tool number to be changed */
long punch_count;/* Number of punch operation */
long tool_life; /* Tool life */
long m_tl_radius;/* Radius of multiple tool */
long m_tl_angle; /* Angle of multiple tool */
char tl_shape; /* Tool shape(C) */
long tl_size_i; /* Tool size(I) */
long tl_size_j; /* Tool size(J) */
long tl_angle; /* Tool angle(K) */
long reserve[3]; /* (reserve) */
} IODBTLDT ;
・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB
typedef struct iodbtldt {
short slct; /* Flag of data selection */
long tool_no; /* Tool number */
long x_axis_ofs; /* X-axis offset */
long y_axis_ofs; /* Y-axis offset */
long turret_pos; /* Turret position */
long chg_tl_no; /* Tool number to be changed */
long punch_count; /* Number of punch operation */
long tool_life; /* Tool life */
long m_tl_radius; /* Radius of multiple tool */
long m_tl_angle; /* Angle of multiple tool */
char tl_shape; /* Tool shape(C) */
long tl_size_i; /* Tool size(I) */
long tl_size_j; /* Tool size(J) */
long tl_angle; /* Tool angle(K) */
char x_axis_dec; /* Decimals places */
char y_axis_dec; /* Decimals places */
char turret_dec; /* Decimals places */
char m_radius_dec; /* Decimals places */
char m_angle_dec; /* Decimals places */
char tl_size_i_dec;/* Decimals places */
char tl_size_j_dec;/* Decimals places */
char tl_angle_dec; /* Decimals places */
short reserve[2]; /* (reserve) */
} IODBTLDT ;
|
ERRORS
| Code | Description | |||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_FUNC |
This function cannot be used except 0i-PD/PF, 16i/18i-P, 30i/31i-LB, 30i/31i-PB |
|||||||||||||||||||||||||||||||||||||||
| EW_LENGTH |
Number of data(number) is wrong. |
|||||||||||||||||||||||||||||||||||||||
| EW_NUMBER |
Start number(s_no) is wrong. |
|||||||||||||||||||||||||||||||||||||||
| EW_DATA |
The tool data is wrong. In order to get more information for this err_no(nErr_no) return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure (nErr_no of ODBERR user define type.).
|
|||||||||||||||||||||||||||||||||||||||
| EW_NOOPT |
The extended driver/library function is necessary. It is necessary to set Punch press function option and Parameter ALA(No.16242#0).(30i/31i-LB only) |
punch\cnc_wrtoolzone
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrtoolzone(unsigned short FlibHndl, short s_no, short *number, IODBTLZN *tlzone);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. |
|||||||||||||||
| s_no | in |
Specify the start tool zone data number. (1,..,12) |
|||||||||||||||
| number | in/out |
Pointer to the number of tool zone data. |
|||||||||||||||
| tlzone | in |
Pointer to the IODBTLZN structure including the tool zone data.
typedef struct iodbtlzn {
short slct; /* Flag of data selection */
long data[2]; /* Tool zone data */
} IODBTLZN ;
|
ERRORS
| Code | Description | ||||||
|---|---|---|---|---|---|---|---|
| EW_FUNC |
This function cannot be used except 0i-PD/PF, 16i/18i-P, 30i/31i-LB, 30i/31i-PB. |
||||||
| EW_LENGTH |
Number of data(number) is wrong. |
||||||
| EW_NUMBER |
Start number(s_no) is wrong. |
||||||
| EW_DATA |
The tool zone data(data) is wrong. In order to get more information for this err_no(nErr_no) return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure (nErr_no of ODBERR user define type.).
|
||||||
| EW_NOOPT |
The safety zone check function and the extended driver/library function are necessary. It is necessary to set Punch press function option and Parameter ALA(No.16242#0).(30i/31i-LB only) |
servo\cnc_svdtendrd
Terminates reading the servo learning data.
PROTOTYPE
FWLIBAPI short WINAPI cnc_svdtendrd(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
| EW_DATA |
|
| EW_NOOPT |
Learning control and Memory expension for learning control or Learning control for parts cutting and the extended driver/library function are necessary. |
| EW_REJECT |
|
servo\cnc_svdtendwr
Terminates writing the servo learning data.
PROTOTYPE
FWLIBAPI short WINAPI cnc_svdtendwr(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
ERRORS
| Code | Description |
|---|---|
| EW_BUSY |
|
| EW_FUNC |
|
| EW_DATA |
|
| EW_NOOPT |
Learning control and Memory expension for learning control or Learning control for parts cutting and the extended driver/library function are necessary. |
servo\cnc_svdtrddata
Reads the servo learning data from the I/F buffer for reading/writing the servo learning data.
In 30i/31i/32i, because importance is attached to the speed of data transfer to the CNC, in general, return of errors(EW_DATA, etc.) may be delayed.
So, even if the error occurs, the result might be normal(Return value = EW_OK and stat=3:Reading end).
Confirm the transfer result of cnc_svdtendrd() after executing this function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_svdtrddata(unsigned short FlibHndl,short *stat,long *length,void *data);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| stat | in |
|
||||||
| length | in |
Pointer to the variable for data length. |
||||||
| data | out |
Pointer to the variable for servo learning data. |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
| EW_LENGTH |
Data length(length) is wrong. |
| EW_DATA |
|
| EW_NOOPT |
Learning control and Memory expension for learning control or Learning control for parts cutting and the extended driver/library function are necessary. |
| EW_BUFFER |
Because the processing of the data transfer on the CNC side is late, the data is not read. |
servo\cnc_svdtstartrd
Starts reading the servo learning data of the axis specified by "axis".
After this function is executed, the data is stored in the I/F buffer in CNC.
Get the operation data in data buffer by using the cnc_svdtrddata function.
In 30i/31i/32i, same I/F as the uploading and downloading is used. So, this function cannot be executed during the uploading and downloading.
The procedure to read the data is shown as follows.
* Please refer to "Self-learning control operation manual" for the handling of the servo learning data.
PROTOTYPE
FWLIBAPI short WINAPI cnc_svdtstartrd(unsigned short FlibHndl,short axis);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| axis | in |
(n : number of controlled axis)
|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| axis | in |
|
ERRORS
| Code | Description |
|---|---|
| EW_BUSY |
The uploading or downloading function is executing. |
| EW_ATTRIB |
The specification of axis number(axis) is improper. |
| EW_NOOPT |
Learning control and Memory expension for learning control or Learning control for parts cutting and the extended driver/library function are necessary. |
| EW_REJECT |
|
servo\cnc_svdtstartwr
Starts writing the servo learning data of the axis specified by "axis".
After this function is executed, the written data is set in the I/F buffer in CNC by using the
cnc_svdtrddata function.
In 30i/31i/32i, same I/F as the uploading and downloading is used. So, this function cannot be executed during the uploading and downloading.
The procedure to write the data is shown as follows.
* Please refer to "Self-learning control operation manual" for the
handling of the servo learning data.
PROTOTYPE
FWLIBAPI short WINAPI cnc_svdtstartwr(unsigned short FlibHndl,short axis);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| axis | in |
(n : number of controlled axis)
|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| axis | in |
|
ERRORS
| Code | Description |
|---|---|
| EW_BUSY |
The uploading or downloading function is executing. |
| EW_ATTRIB |
The specification of axis number(axis) is improper. |
| EW_NOOPT |
Learning control and Memory expension for learning control or Learning control for parts cutting and the extended driver/library function are necessary. |
| EW_REJECT |
|
servo\cnc_svdtstopexec
Stops processing of reading/writing of servo learning data.
PROTOTYPE
FWLIBAPI short WINAPI cnc_svdtstopexec(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
| EW_NOOPT |
Learning control and Memory expension for learning control or Learning control for parts cutting and the extended driver/library function are necessary. |
servo\cnc_svdtwrdata
Writes the servo learning data to the I/F buffer for reading/writing
the servo learning data.
In 30i/31i/32i, because importance is attached to the speed of data transfer to the CNC, in general, return of errors(EW_DATA, etc.) may be delayed.
So, even if the error occurs, the result might be normal(Return value = EW_OK and stat=4:Writing end).
Confirm the transfer result of cnc_svdtendwr() after executing this function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_svdtwrdata(unsigned short FlibHndl,short *stat,long *length,void *data);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| stat | in |
|
||||||
| length | in/out |
Pointer to the variable for data length. |
||||||
| data | in |
Pointer to the variable for servo learning data. |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
| EW_LENGTH |
Data length(length) is wrong. |
| EW_DATA |
|
| EW_NOOPT |
Learning control and Memory expension for learning control or Learning control for parts cutting and the extended driver/library function are necessary. |
| EW_BUFFER |
Because the processing of the data transfer on the CNC side is late, the data is not write. |
toolgeom\cnc_rdtlgeomsize_ext
This function reads the tool geometry size data within the range specified by "s_number" and "data_num".
The tool geometry size data is sequentially read one by one.
If the error occurs, the reading process thereafter is discontinued.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdtlgeomsize_ext( unsigned short FlibHndl, short coord, short s_number, short *data_num, IODBTLGSEXT *tlgsext );
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| coord | in |
Specify the program coordinate system.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| s_number | in |
Specify the data number in which reading is started. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| data_num | in/out |
The pointer to the number of reading data. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tlgsext | out |
The pointer to the structure that storage the tool geometry size data.
typedef struct iodbtlgsext{
long data1; /* Data1 */
long data2; /* Data2 */
long data3; /* Data3 */
long data4; /* Data4 */
char tooltype; /* Tool type */
char install; /* Attachment */
char holder; /* Holder number */
char toolname[9]; /* Tool name */
} IODBTLGSEXT;
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| toolname | out |
Tool name is returned. NULL is set to the end of the character string. |
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
|
| EW_NUMBER |
|
| EW_ATTRIB |
|
| EW_NOOPT |
Tool geometry size data 100-pairs or 300-pairs is necessary. |
toolgeom\cnc_wrtlgeomsize_ext
This function writes / deletes the tool geometry size data within the range specified by "s_number" and "data_num".
The tool geometry size data is sequentially written / deleted one by one.
If the error occurs, the writing process thereafter is discontinued.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrtlgeomsize_ext( unsigned short FlibHndl, short coord, short type, short s_number, short *data_num, IODBTLGSEXT *tlgsext );
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| coord | in |
Specify the program coordinate system.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type | in |
Specify the type of written / deleted tool geometry size data.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| s_number | in |
Specify the data number in which writing / deleting tool geometry size data is started. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| data_num | in/out |
The pointer to the number of writing / deleting data. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tlgsext | out |
The pointer to the structure that storage the tool geometry size data.
typedef struct iodbtlgsext{
long data1; /* Data1 */
long data2; /* Data2 */
long data3; /* Data3 */
long data4; /* Data4 */
char tooltype; /* Tool type */
char install; /* Attachment */
char holder; /* Holder number */
char toolname[9]; /* Tool name */
} IODBTLGSEXT;
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| toolname | out |
Specify the name of the tool. |
ERRORS
| Code | Description | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_LENGTH |
|
|||||||||||||||||||||||||||
| EW_NUMBER |
or the data effective number is over. In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of OBDERR structure.
|
|||||||||||||||||||||||||||
| EW_ATTRIB |
|
|||||||||||||||||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of OBDERR structure.
|
|||||||||||||||||||||||||||
| EW_NOOPT |
Tool geometry size data 100-pairs or 300-pairs are necessary. |
|||||||||||||||||||||||||||
| EW_PROT |
Tool geometry size data is protected for writing. |
toollife\cnc_clrcntinfo
Clear the tool life counter and the tool information.
PROTOTYPE
FWLIBAPI short WINAPI cnc_clrcntinfo(unsigned short FlibHndl,short grpno_s,short grpno_e);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| grpno_s | in |
Specify the start tool group number. |
| grpno_e | in |
Specify the end tool group number. |
ERRORS
| Code | Description |
|---|---|
| EW_NUMBER |
The specification of tool group number (grpno_s,grpno_e) is wrong. |
| EW_NOOPT |
The tool life management function and the extended driver/library function are necessary. |
| EW_REJECT |
Cannot write as the executing, selecting or buffering group. In order to get more information for this err_no return value, execute cnc_getdtailerr function. Wrong tool group number will be set onto the member of err_dtno of OBDERR structure.(30i, 0i-D/F only) |
toollife\cnc_deltlifedt
Deletes the tool data.
When the tool data is deleted, all subsequent tool data is shifted up to fill the deleted space, as shown below.
This function is not available for T/TT system.(except 30i series, 0i-D/F)
PROTOTYPE
FWLIBAPI short WINAPI cnc_deltlifedt(unsigned short FlibHndl,short grp_num,short ent_num);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| grp_num | in |
Specify the tool group number. |
| ent_num | in |
Specify the tool use-order number. |
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_NUMBER |
The specification of tool group number(grp_num) is wrong. |
|||||||||
| EW_ATTRIB |
The specification of tool use-order number(ent_num) is wrong. |
|||||||||
| EW_DATA |
The specification of tool number(data) is wrong. In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
|||||||||
| EW_NOOPT |
The tool life management function and the extended driver/library function are necessary. |
|||||||||
| EW_REJECT |
Cannot write as the executing, selecting or buffering group. |
toollife\cnc_deltlifegrp
Delete the tool group. All information on the specified group is cleared. This function is not available for Series 15 T/TT, 15i.
PROTOTYPE
FWLIBAPI short WINAPI cnc_deltlifegrp(unsigned short FlibHndl,short number);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| number | in |
Specify the tool group number. |
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_NUMBER |
The specification of tool group number(number) is wrong. |
|||||||||
| EW_DATA |
The specification of tool number(data) is wrong. In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.
|
|||||||||
| EW_NOOPT |
The tool life management function and the extended driver/library function are necessary. |
|||||||||
| EW_REJECT |
|
toollife\cnc_instlifedt
Inserts the tool data.
Tool information is set with the state of "life remaining."
Added data is inserted after the specified tool use-order number.
If a tool is added to an unregistered tool group, the tool group itself
is registered. In this case, the life value, life counter, H code,
and D code are set to 0, and the life counter assumes the parameter
setting.
This function is not available for T/TT system. (except 30i series, 0i-D/F)
PROTOTYPE
FWLIBAPI short WINAPI cnc_instlifedt(unsigned short FlibHndl,IDBITD *inst);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| inst | in |
Pointer to the IDBITD structure to set the tool data. The IDBITD structure is as follows.
typedef struct idbitd {
short datano; /* Tool group number. */
short type; /* Tool use-order number. */
long data; /* Tool number. */
} IDBITD ;
|
ERRORS
| Code | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_NUMBER |
The specification of tool group number(datano) is wrong. |
||||||||||||
| EW_ATTRIB |
The specification of tool use-order number(type) is wrong. |
||||||||||||
| EW_DATA |
The specification of tool number(data) is wrong. In order to get more information for this err_no return value, execute cnc_getdtailerr() function. The following details status will be set onto the member, err_no of ODBERR structure.(30i, 0i-D/F only)
|
||||||||||||
| EW_NOOPT |
The tool life management function and the extended driver/library function are necessary. |
||||||||||||
| EW_OVRFLOW |
The maximum number of tool which can be registered is exceeded. |
||||||||||||
| EW_REJECT |
Cannot write as the executing, selecting or buffering group. |
toollife\cnc_rd1length
Reads the tool length compensation number of the specified tool group and tool number.
This function is effective for only M Series. 0 is always read for T Series.
This function cannot be used with Series 15i or the "Tool life management B" option of Series 16i/18i,
so use cnc_rd1tlifedat2 function instead of cnc_rd1length function.
And this function can be only used by the tool number of under 4 digits,
so use cnc_rd1tlifedat2 function in case of setting the tool number of over 4 digits with Series 0i-F, 30i.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rd1length(unsigned short FlibHndl, short grp_num,short tool_num,ODBTLIFE4 *tl_len1);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| grp_num | in |
Specify the tool group number. |
| tool_num | in |
Specify the tool number. |
| tl_len1 | out |
Pointer to the ODBTLIFE4 structure including the tool length compensation number. The ODBTLIFE4 structure is as follows.
typedef struct odbtlife4 {
short datano ; /* Tool group number. */
short type ; /* Tool number. */
long data ; /* Tool length compensation number. (always 0 in T Series) */
} ODBTLIFE4 ;
The tool length compensation number of the specified tool is stored in
"tl_len1.data" with binary format.
The currently used tool group and tool are referred by specifying 0
in "grp_num" and "tool_num".
However, in case that any tool group number has never be specified
since power-on, 0 is stored.
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
The tool life management B option is used. |
| EW_NUMBER |
The specification of tool group number(grp_num) is wrong. |
| EW_ATTRIB |
The specification of tool number(tool_num) is wrong. |
| EW_NOOPT |
The tool life management function and the extended driver/library function are necessary. |
toollife\cnc_rd1radius
Reads the cutter radius compensation number of the specified tool group and tool number.
This function is effective for only M Series. 0 is always read for T Series.
This function cannot be used with Series 15i or the "Tool life management B" option of Series 16i/18i
, so use cnc_rd1tlifedat2 function instead of cnc_rd1radius function.
And this function can be only used by the tool number of under 4 digits,
so use cnc_rd1tlifedat2 function in case of setting the tool number of over 4 digits with Series 0i-F, 30i.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rd1radius(unsigned short FlibHndl, short grp_num,short tool_num,ODBTLIFE4 *radius1);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| grp_num | in |
Specify the tool group number. |
| tool_num | in |
Specify the tool number. |
| radius1 | out |
Pointer to the ODBTLIFE4 structure including the cutter radius compensation number. The ODBTLIFE4 structure is as follows.
typedef struct odbtlife4 {
short datano ; /* Tool group number. */
short type ; /* Tool number. */
long data ; /* Cutter radius compensation number. (always 0 in T Series) */
} ODBTLIFE4 ;
The cutter radius compensation number of the specified tool is stored
in "radius1.data" with binary format.
The currently used tool group and tool are referred by specifying 0
in "grp_num" and "tool_num". However, in case that any tool group
number has never be specified since power-on, 0 is stored.
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
The tool life management B option is used. |
| EW_NUMBER |
The specification of tool group number(grp_num) is wrong. |
| EW_ATTRIB |
The specification of tool number(tool_num) is wrong. |
| EW_NOOPT |
The tool life management function and the extended driver/library function are necessary. |
toollife\cnc_rd1tlifedat2
Reads the various tool information of the specified tool group and tool number.
The following information can be acquired.
0
:
(refer to the following)
1
:
This tool is registered(available).
2
:
This tool has expired.
3
:
This tool was skipped.
The currently used tool group and tool are referred by specifying 0 in "grp_num" and "tool_num". However, in case that any tool group number has never be specified since power-on, 0 is stored.
Please use this function because the cnc_rd1tlifedata function cannot be used when the option, "Tool life management B" is used with Series 16i, 18i.
Please use this function to get tool data with Series 0i-F, 30i. The cnc_rd1tlifedata function can be only used by the tool number of under 4 digits.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rd1tlifedat2(unsigned short FlibHndl,short grp_num,long tool_num,IODBTD2 *tld1);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| grp_num | in |
Specify the tool group number. |
| tool_num | in |
Specify the tool number. |
| tld1 | out |
Pointer to the IODBTD2 structure including the various tool information. The IODBTD2 structure is as follows.
typedef struct iodbtd2 {
short datano; /* Tool group number. */
short dummy; /* Not used. */
long type; /* Not used. */
long tool_num; /* Tool number. */
long h_code; /* Tool length compensation number. */
long d_code; /* Cutter radius compensation number. */
long tool_inf; /* Tool information. */
} IODBTD2 ;
The following information are stored in "tld1" with binary format.
|
ERRORS
| Code | Description |
|---|---|
| EW_NUMBER |
The specification of tool group number(grp_num) is wrong. |
| EW_ATTRIB |
The specification of tool number(tool_num) is wrong. |
| EW_NOOPT |
|
toollife\cnc_rd1tlifedata
Reads the various tool information of the specified tool group and tool number.
The following information are acquired.
0
:
(refer to the following)
1
:
This tool is registered(available).
2
:
This tool has expired.
3
:
This tool was skipped.
The currently used tool group and tool are referred by specifying 0 in "grp_no" and "tool_no". However, in case that any tool group number has never be specified since power-on, 0 is stored.
This function cannot be used with Series 15i or the "Tool life management B" option of Series 16i/18i, so use cnc_rd1tlifedat2 function instead of cnc_rd1tlifedata function.
And this function can be only used by the tool number of under 4 digits, so use cnc_rd1tlifedat2 function in case of setting the tool number of over 4 digits with Series 0i-F, 30i.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rd1tlifedata(unsigned short FlibHndl,short grp_no,short tool_no,IODBTD *tld1);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| grp_no | in |
Specify the tool group number. |
| tool_no | in |
Specify the tool number. |
| tld1 | out |
Pointer to the IODBTD structure including the various tool information. The IODBTD structure is as follows.
typedef struct iodbtd {
short datano; /* Tool group number. */
short type; /* Not used. */
long tool_num; /* Tool number. */
long h_code; /* Tool length compensation number. */
long d_code; /* Cutter radius compensation number. */
long tool_inf; /* Tool information. */
} IODBTD ;
The following information are stored in "tld1" with binary format.
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
The tool life management B option is used. |
| EW_NUMBER |
The specification of tool group number(grp_no) is wrong. |
| EW_ATTRIB |
The specification of tool number(tool_no) is wrong. |
| EW_NOOPT |
The tool life management function and the extended driver/library function are necessary. |
toollife\cnc_rd2length
Reads the tool length compensation number of the specified tool group and tool use-order number.
This function is effective for only M Series. 0 is always read for T Series.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rd2length(unsigned short FlibHndl, short grp_num,short tuse_num,ODBTLIFE4 *tl_len2);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| grp_num | in |
Specify the tool group number. |
| tuse_num | in |
Specify the tool use-order number. |
| tl_len2 | out |
Pointer to the ODBTLIFE4 structure including the tool length compensation number. The ODBTLIFE4 structure is as follows.
typedef struct odbtlife4 {
short datano ; /* Tool group number. */
short type ; /* Tool use-order number. */
long data ; /* Tool length compensation number. (always 0 in T Series) */
} ODBTLIFE4 ;
The tool length compensation number of the specified tool is stored in
"tl_len2.data" with binary format.
The currently used tool group and tool are referred by specifying 0
in "grp_num". However, in case that any tool group number has never be
specified since power-on, 0 is stored.
In case of specifying 0 in "tuse_num", either the currently used tool for already used tool group or the first tool for not-used tool group is referred. |
ERRORS
| Code | Description |
|---|---|
| EW_NUMBER |
The specification of tool group number(grp_num) is wrong. |
| EW_ATTRIB |
The specification of tool use-order number (tuse_num) is wrong. |
| EW_NOOPT |
The tool life management function and the extended driver/library function are necessary. |
toollife\cnc_rd2radius
Reads the cutter radius compensation number of the specified tool group and tool use-order number.
This function is effective for only M Series. 0 is always read for T Series.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rd2radius(unsigned short FlibHndl, short grp_num,short tuse_num,ODBTLIFE4 *radius2);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| grp_num | in |
Specify the tool group number. |
| tuse_num | in |
Specify the tool use-order number. |
| radius2 | out |
Pointer to the ODBTLIFE4 structure including the cutter radius compensation number. The ODBTLIFE4 structure is as follows.
typedef struct odbtlife4 {
short datano ; /* Tool group number. */
short type ; /* Tool use-order number. */
long data ; /* Cutter radius compensation number. (always 0 in T Series) */
} ODBTLIFE4 ;
The cutter radius compensation number of the specified tool is stored
in "radius2.data" with binary format.
The currently used tool group and tool are referred by specifying 0
in "grp_num". However, in case that any tool group number has never be
specified since power-on, 0 is stored.
In case of specifying 0 in "tuse_num", either the currently used tool for already used tool group or the first tool for not-used tool group is referred. |
ERRORS
| Code | Description |
|---|---|
| EW_NUMBER |
The specification of tool group number(grp_num) is wrong. |
| EW_ATTRIB |
The specification of tool use-order number (tuse_num) is wrong. |
| EW_NOOPT |
The tool life management function and the extended driver/library function are necessary. |
toollife\cnc_rd2tlifedata
Reads the various tool information of the specified tool group and
tool use-order number. The following information are acquired.
0
:
(refer to the following)
1
:
This tool is registered(available).
2
:
This tool has expired.
3
:
This tool was skipped.
The currently used tool group and tool are referred by specifying 0 in "grp_no". However, in case that any tool group number has never be specified since power-on, 0 is stored.
In case of specifying 0 in "use_no", either the currently used tool for already used tool group or the first tool for not-used tool group is referred.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rd2tlifedata(unsigned short FlibHndl,short grp_no,short use_no,IODBTD *tld2);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| grp_no | in |
Specify the tool group number. |
| use_no | in |
Specify the tool use-order number. |
| tld2 | out |
Pointer to the IODBTD structure including the various tool information. The IODBTD structure is as follows.
typedef struct iodbtd {
short datano; /* Tool group number. */
short type; /* Tool use-order number. */
long tool_num; /* Tool number. */
long h_code; /* Tool length compensation number. */
long d_code; /* Cutter radius compensation number. */
long tool_inf; /* Tool information. */
} IODBTD ;
The following information are stored in "tld2" with binary format.
|
ERRORS
| Code | Description |
|---|---|
| EW_NUMBER |
The specification of tool group number(grp_no) is wrong. |
| EW_ATTRIB |
The specification of tool use-order number(use_no) is wrong. |
| EW_NOOPT |
The tool life management function and the extended driver/library function are necessary. |
toollife\cnc_rdcount
Reads the tool life counter of the specified tool group.
The unit of the tool life counter is either [minute] or [count].
The parameter LTM(Series 15/15i:7400#3, Series 16/18/21, 16i/18i/21i, 0i, 30i:6800#2)
determines which unit is used.
For M Series, it is possible to specify the tool life counter type (time or count) by G10 command to every tool group.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdcount(unsigned short FlibHndl, short number,ODBTLIFE3 *count);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| number | in |
Specify the tool group number. |
| count | out |
Pointer to the ODBTLIFE3 structure including the tool life counter. The ODBTLIFE3 structure is as follows.
typedef struct odbtlife3 {
short datano ; /* Tool group number. */
short dummy ; /* Not used. */
long data ; /* Tool life counter. */
} ODBTLIFE3 ;
The tool life counter of the specified tool group is stored in
"count.data "with binary format.
The tool life counter of the currently used tool group number
is stored by specifying 0 in "number". However, in case that
any tool group number has never be specified since power-on,
0 is stored.
|
ERRORS
| Code | Description |
|---|---|
| EW_NUMBER |
The specification of tool group number(number) is wrong. |
| EW_NOOPT |
The tool life management function and the extended driver/library function are necessary. |
toollife\cnc_rdexchgtgrp
The group number where the tool exchange signal has been generated is acquired in ascending order.
When the function for optional group number of tool life management B option is used, the optional group number set in each group is also acquired.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdexchgtgrp(unsigned short FlibHndl,short *num_grp, ODBEXGP *exgrp);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| num_grp | in/out |
Specify the pointer to the variable where the number which wants to be acquired is stored. When the value of 0 or less was specified, EW_LENGTH error occurs. This function returns the number of data which was acquired actually. When there is not any exchange necessary tool group, 0 is set. |
| exgrp | out |
Specify the pointer to the ODBEXGP structure which stores the tool group number for which the acquired exchange is necessary. When the array of the number specified by num_grp is not prepared, the operation of this function is not guaranteed. The ODBEXGP structure is as follows.
typedef struct odbexgp {
long grp_no; // Tool group number
long opt_grpno; // Optional group number
} ODBEXGP;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
This function is not supported by CNC. |
| EW_LENGTH |
The value of 0 or less was specified for acquisition number(*num_grp). |
| EW_NOOPT |
The tool life management function and the extended driver/library function are necessary. |
toollife\cnc_rdgrpid
Reads the tool group number in which the specified tool is registered. When the same tool number exists in two or more tool groups,the smallest group number is stored. This function cannot be used with Series 15i or the "Tool life management B" option of Series 16i/18i,
so use cnc_rdgrpid2 function instead of cnc_rdgrpid function. And this function can be only used by the tool number of under 4 digits,so use
cnc_rdgrpid2 function in case of setting the tool number of over 4 digits with Series 0i-F, 30i.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdgrpid(unsigned short FlibHndl, short number,ODBTLIFE1 *grpid);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| number | in |
Specify the tool number. |
| grpid | out |
Pointer to the ODBTLIFE1 structure including the tool group number. The ODBTLIFE1 structure is as follows.
typedef struct odbtlife1 {
short dummy ; /* Not used. */
short type ; /* Tool number. */
long data ; /* Tool group number. */
} ODBTLIFE1 ;
The tool group number in which the specified tool number is registered is stored in
"grpid.data" with binary format. The currently used tool
group number is stored by specifying 0 in "number".
However, in case that any tool group number has never be specified since power-on, 0 is stored.
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
The tool life management B option is used. |
| EW_ATTRIB |
The specification of tool number(number) is wrong. |
| EW_NOOPT |
The tool life management function and the extended driver/library function are necessary. |
toollife\cnc_rdgrpid2
Reads the tool group number in which the specified tool is registered.
When the same tool number exists in two or more tool groups,
the smallest group number is stored.
Please use this function because the cnc_rdgrpid
function cannot be used when the option,
"Tool life management B" is used with Series 16i,18i.
And gets the tool group number by this function with Series 0i-F, 30i,
so use cnc_rdgrpid function
in case of setting the tool number of under 4 digits.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdgrpid2(unsigned short FlibHndl,long number,ODBTLIFE5 *grpid);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| number | in |
Specify the tool number. |
| grpid | out |
Pointer to the ODBTLIFE5 structure including the tool group number. The ODBTLIFE5 structure is as follows.
typedef struct odbtlife5 {
long dummy ; /* Not used. */
long type ; /* Tool number. */
long data ; /* Tool group number. */
} ODBTLIFE5 ;
The tool group number in which the specified tool number is registered
is stored in "grpid.data" with binary format. The currently used tool
group number is stored by specifying 0 in "number". However, in case
that any tool group number has never be specified since power-on, 0
is stored.
|
ERRORS
| Code | Description |
|---|---|
| EW_ATTRIB |
The specification of tool number(number) is wrong. |
| EW_NOOPT |
|
toollife\cnc_rdgrpinfo
Reads the tool group information. The following information can be acquired.
The unit of the tool life value is either [minute] or [count].
The parameter LTM(Series 15/15i:7400#3, Series 16/18/21, 16i/18i/21i, 0i, 30i:6800#2)
determines which unit is used.
For M Series, it is possible to specify the tool life counter type
(time or count) by G10 command to every tool group.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdgrpinfo(unsigned short FlibHndl,short s_grp,short e_grp,short length,IODBTGI *grpinfo);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| s_grp | in |
Specify the start tool group number. |
||||||
| e_grp | in |
Specify the end tool group number. |
||||||
| length | in |
Specify the length of the data block(size of IODBTGI structure) IODBTGI
N is number of the tool group to be read. |
||||||
| grpinfo | out |
Pointer to the IODBTGI structure including the tool group information. The IODBTGI structure is as follows.
typedef struct iodbtgi {
short s_grp; /* Start tool group number. */
short dummy; /* Not used. */
short e_grp; /* End tool group number. */
struct {
long n_tool; /* Number of tool. */
long count_value; /* Tool life value. */
long counter; /* Tool life counter. */
long count_type; /* Tool life counter type. */
} data[N];
} IODBTGI ; /* N is number of tool group to be read. */
The following information are stored in "grpinfo" with binary format.
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of IODBTGI structure(length) is wrong. |
| EW_NUMBER |
The specification of tool group number (s_grp,e_grp) is wrong. |
| EW_NOOPT |
The tool life management function and the extended driver/library function are necessary. |
toollife\cnc_rdgrpinfo2
Reads the tool group information 2. The following information can be acquired.
This function is not available for T and TT series.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdgrpinfo2(unsigned short FlibHndl,short s_grp,short e_grp,short length,IODBTGI2 *grpinfo2);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| s_grp | in |
Specify the start tool group number. |
| e_grp | in |
Specify the end tool group number. |
| length | in |
Specify the length of the data block (size of IODBTGI2 structure) IODBTGI2
N is the number of the tool group to be read. |
| grpinfo2 | out |
Pointer to the IODBTGI2 structure including the tool group information. The IODBTGI2 structure is as follows.
typedef struct iodbtgi {
short s_grp; /* Start group number */
short dummy; /* unused */
short e_grp; /* End group number */
long opt_grpno[N]; /* Optional groupnumber */
} IODBTGI2 ; /* N is the number of tool group to be read. */
The following information are stored in "grpinfo2" with binary format.
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of IODBTGI2 structure(length) is wrong. |
| EW_NUMBER |
The specification of tool group number (s_grp,e_grp) is wrong. |
| EW_NOOPT |
The tool life management B function and the extended driver/library function are necessary.(16i/18i only) The tool life management function and the extended driver/library function is necessary.(0i-F, 30i only) |
| EW_PARAM |
The tool life management B function and optional group number are necessary. |
toollife\cnc_rdgrpinfo3
Reads the tool group information 3. The following information can be acquired.
This function is not available for T and TT series.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdgrpinfo3(unsigned short FlibHndl,short s_grp,short e_grp,short length,IODBTGI3 *grpinfo3);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| s_grp | in |
Specify the start tool group number. |
| e_grp | in |
Specify the end tool group number. |
| length | in |
Specify the length of the data block (size of IODBTGI3 structure) IODBTGI3
N is the number of the tool group to be read. |
| grpinfo3 | out |
Pointer to the IODBTGI3 structure including the tool group information. The IODBTGI3 structure is as follows.
typedef struct iodbtgi {
short s_grp; /* start group number */
short dummy; /* unused */
short e_grp; /* end group number */
long life_rest[N]; /* rest counter */
} IODBTGI3 ; /* N is the number of tool group to be read. */
The following information are stored in "grpinfo3" with binary format.
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of IODBTGI3 structure(length) is wrong. |
| EW_NUMBER |
The specification of tool group number (s_grp,e_grp) is wrong. |
| EW_NOOPT |
The tool life management B function and the extended driver/library function are necessary.(16i/18i only) The tool life management function and the extended driver/library function is necessary.(0i-F, 30i only) |
| EW_PARAM |
The tool life management B function and reset counter are necessary. |
toollife\cnc_rdgrpinfo4
Reads the tool group information 4. The following information can be acquired.
The unit of the tool life value is either [minute] or [count].
The parameter LTM(6800#2) determines which unit is used.
For M Series, it is possible to specify the tool life counter type
(time or count) by G10 command to every tool group.
In case of M system, if tool life management B option(In case of 0i-F, 30i/31i/32i:Parameter No.6805#4) is used, the
optional group number and the rest counter is also acquired.
When the tool life management B is not used or the system is T, the 0
is set for the optional group number and the rest counter.
0
:
count
1
:
minute
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdgrpinfo4(unsigned short FlibHndl,short grp_no, short direction, short num_to_read,short *num_read, IODBTGI4 *grpinfo4);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| grp_no | in |
Specify the read start tool group number. When the value of outside of the range to the tool group number is specified, EW_NUMBER error occurs. In case of range of the tool group number, the read is started from a group which is the nearest from the specified group number. |
||||||
| direction | in |
Specify the search direction. The direction of the search specifies whether to read in the ascending order or the descending order based on the number specified by grp_no.
|
||||||
| num_to_read | in |
Specify the number which wants to read. When the value of 0 or less was specified, EW_LENGTH error occurs. |
||||||
| num_read | out |
Specify the pointer to the variable to store the number actually read. If the group which registered is not found when the tool group was searched according to the specified direction, the 0 is set as the result. |
||||||
| grpinfo4 | out |
the pointer to the array of IODBTGI4 structure which returns the tool group information. The IODBTGI4 structure is as follows.
typedef struct iodbtgi4 {
short grp_no;
long n_tool;
long count_value;
long counter;
long count_type;
long opt_grpno;
long life_rest;
} IODBTGI4;
The following information can be acquired.
<Note> |
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
The value of 0 or less was specified for read number(num_to_read). |
| EW_NUMBER |
Tool group number(grp_no) is wrong. |
| EW_ATTRIB |
Search direction(direction) is wrong. |
| EW_NOOPT |
The tool life management function and the extended driver/library function are necessary. |
toollife\cnc_rdlife
Reads the tool life value of the specified tool group.
The unit of the tool life value is either [minute] or [count].
The parameter LTM(Series 15/15i:7400#3, Series 16/18/21, 16i/18i/21i, 0i, 30i:6800#2)
determines which unit is used.
For M Series, it is possible to specify the tool life counter type
(time or count) by G10 command to every tool group.
Reads the tool life value of the specified tool group.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdlife(unsigned short FlibHndl, short number,ODBTLIFE3 *life);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| number | in |
Specify the tool group number. |
| life | out |
Pointer to the ODBTLIFE3 structure including the tool life value. The ODBTLIFE3 structure is as follows.
typedef struct odbtlife3 {
short datano ; /* Tool group number. */
short dummy ; /* Not used. */
long data ; /* Tool life value. */
} ODBTLIFE3 ;
The tool life value of the specified tool group is stored in
"life.data" with binary format.
The tool life value of the currently used tool group number is stored
by specifying 0 in "number". However, in case that any tool group
number has never be specified since power-on, 0 is stored.
|
ERRORS
| Code | Description |
|---|---|
| EW_NUMBER |
The specification of tool group number(number) is wrong. |
| EW_NOOPT |
The tool life management function and the extended driver/library function are necessary. |
toollife\cnc_rdmaxgrp
Reads the maximum number of tool group.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdmaxgrp(unsigned short FlibHndl,ODBLFNO *maxgrp);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| maxgrp | out |
Pointer to the ODBLFNO structure including the maximum number of tool group. The ODBLFNO structure is as follows.
typedef struct odblfno {
short datano; /* Not used. */
short type; /* Not used. */
short data; /* Maximum number of tool group */
} ODBLFNO ;
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The tool life management function and the extended driver/library function are necessary. |
toollife\cnc_rdmaxtool
Reads the maximum number of tool within group.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdmaxtool(unsigned short FlibHndl,ODBLFNO *maxtool);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| maxtool | out |
Pointer to the ODBLFNO structure including the maximum number of tool group. The ODBLFNO structure is as follows.
typedef struct odblfno {
short datano; /* Not used. */
short type; /* Not used. */
short data /* Maximum number of tool within group. */
} ODBLFNO ;
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The tool life management function and the extended driver/library function are necessary. |
toollife\cnc_rdngrp
Reads the total number of tool groups in which at least one tool is registered.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdngrp(unsigned short FlibHndl, ODBTLIFE2 *ngrp);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| ngrp | out |
Pointer to the ODBTLIFE2 structure including the total number of tool groups. The ODBTLIFE2 structure is as follows.
typedef struct odbtlife2 {
short dummy[2] ; /* Not used. */
long data ; /* Number of tool groups */
} ODBTLIFE2 ;
The total number of tool groups in which at least one tool is registered is stored in "ngrp.data" with binary format.
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The tool life management function and the extended driver/library function are necessary. |
toollife\cnc_rdntool
Reads the number of tools which are registered in the specified tool group.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdntool(unsigned short FlibHndl, short number,ODBTLIFE3 *ntool);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| number | in |
Specify the tool group number. |
| ntool | out |
Pointer to the ODBTLIFE3 structure including the number of tools. The ODBTLIFE3 structure is as follows.
typedef struct odbtlife3 {
short datano ; /* Tool group number. */
short dummy ; /* Not used. */
long data ; /* Number of tool. */
} ODBTLIFE3 ;
The number of tools which are registered in the specified tool group is
stored in "ntool.data" with binary format.
The number of tools which are registered in the currently used tool
group number is stored by specifying 0 in "number". However, in case
that any tool group number has never be specified since power-on, 0 is stored.
|
ERRORS
| Code | Description |
|---|---|
| EW_NUMBER |
The specification of tool group number(number) is wrong. |
| EW_NOOPT |
The tool life management function and the extended driver/library function are necessary. |
toollife\cnc_rdtlgrp
Reads the tool group information. The following information can be acquired.
The unit of the tool life value is either [minute] or [count].
The parameter LTM (Series 15i:7400#3, Series16i/18i/21i, 0i, 30i:6800#2) determines which unit is used.
The parameter LTM (30i:6800#2) determines which unit is used.
For M Series, it is possible to specify the tool life counter type (time or count) by G10 command to every tool group.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdtlgrp(unsigned short FlibHndl, long grp_no, short* num, IODBTLGRP *tlgrp);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||
| grp_no | in |
Specify the starting group number. |
||||||||||||||
| num | in/out |
Pointer to the number of groups to be read. Actual number of groups being read is stored after this function call. |
||||||||||||||
| tlgrp | out |
Pointer to the array of the ODBTLGRP structure including the tool group information. The ODBTLGRP structure is as follows.
typedef struct iodbtlgrp {
long ntool; /* number of tool */
long nfree; /* number of free tool */
long life; /* tool life */
long count; /* tool life counter */
long use_tool; /* selected tool use-order number */
long opt_grpno; /* optional tool group number */
long life_rest; /* rest counter */
short rest_sig; /* status of rest signal */
short count_type; /* type of tool life counter */
} ODBTLGRP ;
The following information are stored in "tlgrp" with binary format.
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
The number of tool groups (*num) is 0 or less. |
| EW_NUMBER |
The specification of tool group number (grp_no) is wrong. |
| EW_NOOPT |
The tool life management function and the extended driver/library function are necessary. |
toollife\cnc_rdtlinfo
Reads the maximum number of tool group, the maximum number of tool within group and the maximum number of life count.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdtlinfo(unsigned short FlibHndl, ODBTLINFO *tlinfo);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| tlinfo | out |
Pointer to the ODBTLINFO structure including the maximum number of tool group, the maximum number of tool within group and the maximum number of life count. The ODBTLINFO structure is as follows.
typedef struct odbtlinfo {
long max_group; /* maximum number of tool group */
long max_tool; /* maximum number of tool within group */
long max_minute; /* maximum number of life count (minutes) */
long max_cycle; /* maximum number of life count (cycles) */
} ODBTLINFO;
The following information are stored in "tlinfo" with binary format.
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The tool life management function and the extended driver/library function are necessary. |
toollife\cnc_rdtltool
Reads the various tool information of the specified tool group. The following information are acquired.
0
:
Tool data is nothing.
1
:
This tool is registered (available).
2
:
This tool has expired.
3
:
This tool was skipped.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdtltool(unsigned short FlibHndl, long grp_no, long use_no, short* num, IODBTLTOOL *tltool);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| grp_no | in |
Specify the tool group number. |
| use_no | in |
Specify the starting tool use-order number. |
| num | in/out |
Pointer to the number of tool data to be read. Actual number of tool data being read is stored after this function call. |
| tltool | out |
Pointer to the array of the IODBTLTOOL structure including the tool data. The IODBTLTOOL structure is as follows.
typedef struct iodbtltool {
long tool_num; /* tool number */
long h_code; /* tool length compensation number */
long d_code; /* cutter radius compensation number */
long tool_inf; /* tool information */
} IODBTLTOOL ;
The following information are stored in "tltool" with binary format.
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
The number of tool data (*num) is 0 or less. |
| EW_NUMBER |
The specification of tool group number (grp_no) is wrong. |
| EW_ATTRIB |
The specification of tool use-order number (use_no) is wrong. |
| EW_NOOPT |
The tool life management function and the extended driver/library function are necessary. |
toollife\cnc_rdtlusegrp
Reads the used tool group number.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdtlusegrp(unsigned short FlibHndl, ODBUSEGRP *usegrp);
ARGUMENTS
| Name | Direction | Description | ||
|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||
| usegrp | out |
Pointer to the ODBUSEGRP structure including the used tool group number. The ODBUSEGRP structure is as follows.
typedef struct odbusegrp {
long next; /* number of tool group to be used next */
long use; /* number of tool group currently in use */
long slct; /* number of tool group currently selected */
long opt_next; /* number of tool optional group to be used next */
long opt_use; /* number of tool optional group currently in use */
long opt_slct; /* number of tool optional group currently selected */
} ODBUSEGRP ;
The following information are stored in "usegrp" with binary format.
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The tool life management function and the extended driver/library function are necessary. |
toollife\cnc_rdtoolgrp
Reads the various tool information of the specified tool group at a time.
The unit of the tool life value and the tool life counter is
either [minute] or [count].
The parameter LTM(Series 15/15i:7400#3, Series 16/18/21, 16i/18i/21i, 0i, 30i:6800#2)
determines which unit is used.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdtoolgrp(unsigned short FlibHndl,short grp_num,short length,ODBTG *toolgrp);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| grp_num | in |
Specify the tool group number. The currently used tool group is referred by specifying 0. |
| length | in |
Specify the length of the data block(size of ODBTG structure) ODBTG
N is Number of tool. |
| toolgrp | out |
Pointer to the ODBTG structure including the various tool information. The ODBTG structure is as follows.
typedef struct odbtg {
short grp_num ; /* Tool group number. */
short dummy[2] ; /* Not used. */
long ntool ; /* Number of tool. */
long life ; /* Tool life value. */
long count ; /* Tool life counter. */
struct {
long tuse_num ; /* Tool use-order number */
long tool_num ; /* Tool number */
long length_num ; /* Tool length compensation no.*/
long radius_num ;/* Cutter radius compensation no.*/
long tinfo ; /* Tool information. */
} data[N] ;
} ODBTG ; /* N is Number of tool. */
The following information are stored in "toolgrp" with binary format.toolgrp.ntool |
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of ODBTG structure(length) is wrong. |
| EW_NUMBER |
The specification of tool group number(grp_num) is wrong. |
| EW_NOOPT |
The tool life management function and the extended driver/library function are necessary. |
toollife\cnc_rdtoolrng
Reads the number of tool, the tool life value and the tool life counter
within the specified tool group range.
The unit of the tool life value and the tool life counter is either
[minute] or [count].
The parameter LTM(Series 15/15i:7400#3, Series 16/18/21, 16i/18i/21i, 0i, 30i:6800#2)
determines which unit is used.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdtoolrng(unsigned short FlibHndl,short s_number,short e_number,short length,IODBTR *toolnum);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| s_number | in |
Specify the start tool group number. |
| e_number | in |
Specify the end tool group number. |
| length | in |
Specify the length of the data block(size of IODBTR structure) IODBTR
N is number of the tool group to be read. |
| toolnum | out |
Pointer to the IODBTR structure including the number of tool, the tool life value and the tool life counter. The IODBTR structure is as follows.
typedef struct iodbtr {
short datano_s ; /* Start group number. */
short dummy ; /* Not used. */
short datano_e ; /* End group number. */
struct {
long ntool ; /* Number of tool. */
long life ; /* Tool life value. */
long count ; /* Tool life counter. */
} data[N] ;
} IODBTR ; /* N is number of tool groups to be read. */s
The number of tool, the tool life value and the tool life counter are
stored in each "toolnum.data[i].ntool", "toolnum.data[i].life" and
"toolnum.data[i].count" with binary format.
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of IODBTR structure(length) is wrong. |
| EW_NUMBER |
The specification of tool group number (s_number,e_number) is wrong. |
| EW_NOOPT |
The tool life management function and the extended driver/library function are necessary. |
toollife\cnc_rdusegrpid
Reads the used tool group number.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdusegrpid(unsigned short FlibHndl,ODBUSEGR *usegrpid);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| usegrpid | out |
Pointer to the ODBUSEGR structure including the used tool group number. The ODBUSEGR structure is as follows.
typedef struct odbusegr {
short datano; /* Not used */
short type; /* Not used */
long next; /* Number of tool group to be used next */
long use; /* Number of tool group currently in use */
long slct; /* Number of tool group currently selected */
} ODBUSEGR ;
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The tool life management function and the extended driver/library function are necessary. |
toollife\cnc_rdusetlno
Read the tool use-order numbers in the specified groups.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdusetlno(unsigned short FlibHndl,short s_grp,short e_grp,short length,ODBTLUSE *usetlno);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| s_grp | in |
Specify the start tool group number. |
| e_grp | in |
Specify the end tool group number. |
| length | in |
Specify the length of the data block(size of ODBTLUSE structure) ODBTLUSE
N is number of the tool group to be read. |
| usetlno | out |
Pointer to the ODBTLUSE structure including the tool use-order number. The ODBTLUSE structure is as follows.
typedef struct odbtluse {
short s_grp; /* Start tool group number. */
short dummy; /* Not used. */
short e_grp; /* End tool group number. */
long data[N]; /* Tool use-order number in groups. */
} ODBTLUSE ; /* N is the number of tool groups to be read. */
The following information are stored in "usetlno" with binary format.
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of ODBTLUSE structure(length) is wrong. |
| EW_NUMBER |
The specification of tool group number (s_grp,e_grp) is wrong. |
| EW_NOOPT |
The tool life management function and the extended driver/library function are necessary. |
toollife\cnc_t1info
Reads the tool information of the specified tool group and tool number.
This function cannot be used with Series 15i or the "Tool life management B" option of Series 16i/18i,
so use cnc_rd1tlifedat2 function instead of cnc_t1info function.
And this function can be only used by the tool number of under 4 digits,
so use cnc_rd1tlifedat2 function in case of setting the tool number of over 4 digits with Series 0i-F, 30i.
PROTOTYPE
FWLIBAPI short WINAPI cnc_t1info(unsigned short FlibHndl,short grp_num, short tool_num,ODBTLIFE4 *tinfo1);
ARGUMENTS
| Name | Direction | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||
| grp_num | in |
Specify the tool group number. |
||||||||||
| tool_num | in |
Specify the tool number. |
||||||||||
| tinfo1 | out |
Pointer to the ODBTLIFE4 structure including the tool information. The ODBTLIFE4 structure is as follows.
typedef struct odbtlife4 {
short datano ; /* Tool group number. */
short type ; /* Tool number. */
long data ; /* Tool information. */
} ODBTLIFE4 ;
The tool information of the specified tool is stored in "tinfo1.data" with binary format as follows.
The currently used tool group and tool are referred by specifying 0 in "grp_num" and "tool_num". However, in case that any tool group number has never be specified since power-on, 0 is stored. |
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
The tool life management B option is used. |
| EW_NUMBER |
The specification of tool group number(grp_num) is wrong. |
| EW_ATTRIB |
The specification of tool number(tool_num) is wrong. |
| EW_NOOPT |
The tool life management function and the extended driver/library function are necessary. |
toollife\cnc_t2info
Reads the tool information of the specified tool group and tool use-order number.
PROTOTYPE
FWLIBAPI short WINAPI cnc_t2info(unsigned short FlibHndl,short grp_num,short tuse_num,ODBTLIFE4 *tinfo2);
ARGUMENTS
| Name | Direction | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||
| grp_num | in |
Specify the tool group number. |
||||||||||
| tuse_num | in |
Specify the tool use-order number. |
||||||||||
| tinfo2 | out |
Pointer to the ODBTLIFE4 structure including the tool information. The ODBTLIFE4 structure is as follows.
typedef struct odbtlife4 {
short datano ; /* Tool group number. */
short type ; /* Tool use-order number. */
long data ; /* Tool information. */
} ODBTLIFE4 ;
The tool information of the specified tool is stored in "tinfo2.data" with binary format as follows.
The currently used tool group and tool are referred by specifying 0 in "grp_num". However, in case that any tool group number has never be specified since power-on, 0 is stored. In case of specifying 0 in "tuse_num", either the currently used tool for already used tool group or the first tool for not-used tool group is referred. |
ERRORS
| Code | Description |
|---|---|
| EW_NUMBER |
The specification of tool group number(grp_num) is wrong. |
| EW_ATTRIB |
The specification of tool use-order number (tuse_num) is wrong. |
| EW_NOOPT |
The tool life management function and the extended driver/library function are necessary. |
toollife\cnc_toolnum
Reads the tool number of the specified tool group and tool use-order number.
PROTOTYPE
FWLIBAPI short WINAPI cnc_toolnum(unsigned short FlibHndl,short grp_num,short tuse_num,ODBTLIFE4 *toolnum);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| grp_num | in |
Specify the tool group number. |
| tuse_num | in |
Specify the tool use-order number. |
| toolnum | out |
Pointer to the ODBTLIFE4 structure including the tool number. The ODBTLIFE4 structure is as follows.
typedef struct odbtlife4 {
short datano ; /* Tool group number. */
short type ; /* Tool use-order number. */
long data ; /* Tool number. */
} ODBTLIFE4 ;
The tool number of the specified tool is stored in "toolnum.data" with
binary format.
The currently used tool group and tool are referred by specifying 0 in "grp_num". However, in case that any tool group number has never be specified since power-on, 0 is stored. In case of specifying 0 in "tuse_num", either the currently used tool for already used tool group or the first tool for not-used tool group is referred. |
ERRORS
| Code | Description |
|---|---|
| EW_NUMBER |
The specification of tool group number(grp_num) is wrong. |
| EW_ATTRIB |
The specification of tool use-order number (tuse_num) is wrong. |
| EW_NOOPT |
The tool life management function and the extended driver/library function are necessary. |
toollife\cnc_wr1tlifedat2
Writes the various tool information of the specified tool group and tool number.
The following information can be modified.
1
:
This tool is registered(available).
2
:
This tool has expired.
3
:
This tool was skipped.
This function is not available for T/TT system. (except 30i series, 0i-D/F)
Please use this function because the cnc_wr1tlifedata function cannot be used when the option, "Tool life management B" function is used with Series 16i, 18i, 0i-F and 30i/31i/32i.
Please use this function because the cnc_wr1tlifedata function cannot be used when the option, "Tool life management B" function is used.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wr1tlifedat2(unsigned short FlibHndl,IODBTD2 *tld1);
ARGUMENTS
| Name | Direction | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||
| tld1 | in |
Pointer to the IODBTD2 structure to set the various tool information. The IODBTD2 structure is as follows.
typedef struct iodbtd2 {
short datano; /* Tool group number. */
short dummy; /* Not used. */
long type; /* Tool number(present). */
long tool_num; /* Tool number(update). */
long h_code; /* Tool length compensation number. */
long d_code; /* Cutter radius compensation number. */
long tool_inf; /* Tool information. */
} IODBTD2 ;
|
ERRORS
| Code | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_NUMBER |
The specification of tool group number(datano) is wrong. |
|||||||||||||||
| EW_ATTRIB |
The specification of (present) tool number (type) is wrong. |
|||||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
|
|||||||||||||||
| EW_NOOPT |
|
|||||||||||||||
| EW_NOOPT |
The tool life management function and the extended driver/library function are necessary. |
|||||||||||||||
| EW_REJECT |
Cannot write as the executing, selecting or buffering group. |
toollife\cnc_wr1tlifedata
Writes the various tool information of the specified tool group and tool number.
The following information can be modified.
1
:
This tool is registered(available).
2
:
This tool has expired.
3
:
This tool was skipped.
This function is not available for T/TT system. (except 30i series, 0i-D/F)
This function cannot be used with Series 15i or the "Tool life management B" function of Series 16i/18i, 0i-F and 30i, so use cnc_wr1tlifedat2 function instead of cnc_wr1tlifedata function.
This function cannot be used with the "Tool life management B" function, so use cnc_wr1tlifedat2 function instead of cnc_wr1tlifedata function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wr1tlifedata(unsigned short FlibHndl,IODBTD *tld1);
ARGUMENTS
| Name | Direction | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||
| tld1 | in |
Pointer to the IODBTD structure to set the various tool information. The IODBTD structure is as follows.
typedef struct iodbtd {
short datano; /* Tool group number. */
short type; /* Tool number(present). */
long tool_num; /* Tool number(update). */
long h_code; /* Tool length compensation number. */
long d_code; /* Cutter radius compensation number. */
long tool_inf; /* Tool information. */
} IODBTD ;
|
ERRORS
| Code | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_FUNC |
The tool life management B option is used. |
|||||||||||||||
| EW_NUMBER |
The specification of tool group number(datano) is wrong. |
|||||||||||||||
| EW_ATTRIB |
The specification of the present tool number (type) is wrong. |
|||||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
|||||||||||||||
| EW_NOOPT |
The tool life management function and the extended driver/library function are necessary. |
|||||||||||||||
| EW_REJECT |
Cannot write as the executing, selecting or buffering group. |
toollife\cnc_wr2tlifedata
Writes the various tool information of the specified tool group and tool use-order number.
The following information can be modified.
1
:
This tool is registered(available).
2
:
This tool has expired.
3
:
This tool was skipped.
This function is not available for T/TT system. (except 30i series, 0i-D/F)
PROTOTYPE
FWLIBAPI short WINAPI cnc_wr2tlifedata(unsigned short FlibHndl,IODBTD *tld2);
ARGUMENTS
| Name | Direction | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||
| tld2 | in |
Pointer to the IODBTD structure to set the various tool information. The IODBTD structure is as follows.
typedef struct iodbtd {
short datano; /* Tool group number. */
short type; /* Tool use-order number. */
long tool_num; /* Tool number. */
long h_code; /* Tool length compensation number. */
long d_code; /* Cutter radius compensation number. */
long tool_inf; /* Tool information. */
} IODBTD ;
|
ERRORS
| Code | Description | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_NUMBER |
The specification of tool group number(datano) is wrong. |
|||||||||||||||||||||
| EW_ATTRIB |
The specification of tool use-order number (type) is wrong. |
|||||||||||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
|
|||||||||||||||||||||
| EW_NOOPT |
The tool life management function and the extended driver/library function are necessary. |
|||||||||||||||||||||
| EW_REJECT |
Cannot write as the executing, selecting or buffering group. |
toollife\cnc_wrcountr
Writes the tool life counter within the specified tool group range.
The unit of the tool life counter is either [minute] or [count].
The parameter LTM(Series 15/15i:7400#3, Series 16/18/21, 16i/18i/21i, 0i, 30i:6800#2)
determines which unit is used.
The maximum number of the tool life counter is the following.
At the count specification
:
9999 counts
:
999999 counts(in case of the tool life management B)
At the minute specification
:
4300 minutes
:
100000 minutes(in case of the tool life management B)
At the count specification
:
99999999 counts
At the minute specification
:
59940 minutes
At the count specification
:
65535 counts
:
99999999 counts(in case of the tool life management B)
At the minute specification
:
4300 minutes
:
100000 minutes(in case of the tool life management B)
(When life count interval is 0.1 seconds, the max. value is 60,000 minutes.)
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrcountr(unsigned short FlibHndl,short length,IDBWRC *wrcount);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| length | in |
Specify the length of the data block(size of IDBWRC structure) IDBWRC
N is number of the tool group to be written. |
| wrcount | in |
Pointer to the IDBWRC structure to set the tool life counter. The IDBWRC structure is as follows.
typedef struct idbwrc {
short datano_s ; /* Start tool group number. */
short dummy ; /* Not used. */
short datano_e ; /* End tool group number. */
struct {
long dummy[2] ; /* Not used. */
long count ; /* Tool life counter. */
} data[N] ;
} IDBWRC ; /* N is the number of tool groups to be written. */
Store the start tool group number in "wrcount.datano_s" with binary format.Store the end tool group number in "wrcount.datano_e" with binary format. Store the tool life counter in "wrcount.data[i].count" with binary format. |
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of IDBWRC structure(length) is wrong. |
| EW_NUMBER |
The specification of tool group number (datano_s,datano_e) is wrong. |
| EW_DATA |
Tool life counter(count) is out of range. |
| EW_NOOPT |
The tool life management function is necessary. |
toollife\cnc_wrgrpinfo
Writes the tool group information. The following information can be modified. This function is not available for T/TT system. (except 30i series, 0i-D/F) The maximum number of the tool life value and the tool life counter is the following.
0
:
count
1
:
minute
At the count specification
:
9999 counts
:
999999 counts(in case of the tool life management B)
At the minute specification
:
4300 minutes
:
100000 minutes(in case of the tool life management B)
At the count specification
:
99999999 counts
At the minute specification
:
59940 minutes
At the count specification
:
65535 counts
:
99999999 counts(in case of the tool life management B)
At the minute specification
:
4300 minutes
:
100000 minutes(in case of the tool life management B)
(When life count interval is 0.1 seconds, the max. value is 60,000 minutes.)
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrgrpinfo(unsigned short FlibHndl,short length,IODBTGI *grpinfo);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| length | in |
Specify the length of the data block(size of IODBTGI structure) IODBTGI
N is number of the tool group to be written. |
||||||
| grpinfo | in |
Pointer to the IODBTGI structure to set the tool group information. The IODBTGI structure is as follows.
typedef struct iodbtgi {
short s_grp; /* Start tool group number. */
short dummy; /* Not used. */
short e_grp; /* End tool group number. */
struct {
long n_tool; /* Not used. */
long count_value; /* Tool life value. */
long counter; /* Tool life counter. */
long count_type; /* Tool life counter type. */
} data[N];
} IODBTGI ; /* N is number of tool group to be written. */
|
ERRORS
| Code | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_LENGTH |
Size of IODBTGI structure(length) is wrong. |
||||||||||||||||||
| EW_NUMBER |
The specification of tool group number (s_grp,e_grp) is wrong. |
||||||||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
|
||||||||||||||||||
| EW_NOOPT |
The tool life management function and the extended driver/library function are necessary. |
||||||||||||||||||
| EW_REJECT |
Cannot write as the executing, selecting or buffering group. |
toollife\cnc_wrgrpinfo2
Write the tool group information.
The following information can be modified.
This function is not available for T/TT series. (except 30i series, 0i-D/F)
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrgrpinfo2(unsigned short FlibHndl, short length,IODBTGI2 *grpinfo2);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| length | in |
Specify the length of the data block (size of IODBTGI2 structure) IODBTGI2
N is the number of the tool group to be written. |
| grpinfo2 | in |
Pointer to the IODBTGI2 structure to set the tool group information. The IODBTGI2 structure is as follows.
typedef struct iodbtgi {
short s_grp; /* start group number */
short dummy; /* unused */
short e_grp; /* end group number */
long opt_grpno[N]; /* optional group number */
} IODBTGI2 ; /* N is the number of tool group to be written. */
|
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_LENGTH |
Size of IODBTGI2 structure(length) is wrong. |
|||||||||
| EW_NUMBER |
The specification of tool group number (s_grp,e_grp) is wrong. |
|||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
|||||||||
| EW_NOOPT |
The tool life management B function and the extended driver/library function are necessary.(16i/18i only) The tool life management function and the extended driver/library function is necessary.(0i-F, 30i/31i/32i only) |
|||||||||
| EW_PARAM |
The tool life management B function and optional group number are necessary. |
|||||||||
| EW_REJECT |
Cannot write as the executing, selecting or buffering group. |
toollife\cnc_wrgrpinfo3
Write the tool group information.
The following information can be modified.
This function is not available for T/TT series. (except 30i series, 0i-D/F)
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrgrpinfo3(unsigned short FlibHndl,short length,IODBTGI3 *grpinfo3);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| length | in |
Specify the length of the data block (size of IODBTGI3 structure) IODBTGI3
N is the number of the tool group to be written. |
| grpinfo3 | in |
Pointer to the IODBTGI3 structure to set the tool group information. The IODBTGI3 structure is as follows.
typedef struct iodbtgi {
short s_grp; /* start group number */
short dummy; /* unused */
short e_grp; /* end group number */
long life_rest[N]; /* rest counter */
} IODBTGI3 ; /* N is the number of tool group to be written. */
|
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_LENGTH |
Size of IODBTGI3 structure(length) is wrong. |
|||||||||
| EW_NUMBER |
The specification of tool group number (s_grp,e_grp) is wrong. |
|||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
|||||||||
| EW_NOOPT |
The tool life management B function and the extended driver/library function are necessary.(16i/18i only) The tool life management function and the extended driver/library function is necessary.(0i-F, 30i only) |
|||||||||
| EW_PARAM |
The tool life management B function and reset counter are necessary. |
|||||||||
| EW_REJECT |
Cannot write as the executing, selecting or buffering group. |
toolmng\cnc_btlfpotsrh
Searches the empty pot in the same magazine based on the specified pot position.
PROTOTYPE
FWLIBAPI short WINAPI cnc_btlfpotsrh( unsigned short FlibHndl, short type, short magnum, short geomnum, short *potnum );
ARGUMENTS
| Name | Direction | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||
| type | in |
Specify the search direction of empty pot.
|
|||||||||
| magnum | in |
Specify the magazine number for search object. |
|||||||||
| geomnum | in |
Specify the tool geometry number of tool which wants to be stored. |
|||||||||
| potnum | in/out |
Specify the pointer to the current pot number. |
ERRORS
| Code | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_BUSY |
|
||||||||||||
| EW_NUMBER |
|
||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of OBDERR structure.
|
||||||||||||
| EW_NOOPT |
The Tool management function 64-pairs, 240-pairs or 1000 pairs and the tool management function for oversize tools function are necessary. |
||||||||||||
| EW_OVRFLOW |
|
toolmng\cnc_delmag_property
Deletes the magazine property data.
PROTOTYPE
FWLIBAPI short WINAPI cnc_delmag_property( unsigned short FlibHndl, short *data_num, IODBMAGPRTY2 * magprty );
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| data_num | in/out |
The pointer to the number of deleting data. ("1"-"8")
The magazine property data that belongs to one magazine number is counted by the set with one deleting number. |
| magprty | in/out |
The pointer to the structure that storage the magazine property data.
When the number of deleting data ("data_num") is not "-1", set the to the structure data of "mag" beforehand.
IODBMAGPRTY2 structure is as follows.
typedef struct iodbmagprty2 {
short mag ; /* Magazine number */
short reserve ; /* Reserved */
} IODBMAGPRTY2;
|
ERRORS
| Code | Description |
|---|---|
| EW_BUSY |
|
| EW_LENGTH |
|
| EW_NUMBER |
|
| EW_NOOPT |
The Tool management function 64-pairs, 240-pairs or 1000 pairs and the tool management extension B function are necessary. |
toolmng\cnc_delmagazine
Deletes the registered Tool management data number from the Magazine management table.
This function searches at the Magazine management table using the magazine number, pot number.
And if it finds, it deletes the Tool management data number from the matched entry.
Note) This function is only for "Fast Ethernet board" and "Embedded Ethernet". So, this function is not supported at "Ethernet board".
PROTOTYPE
FWLIBAPI short WINAPI cnc_delmagazine(unsigned short FlibHndl,short *data_num, IODBTLMAG2 *mag);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| data_num | in/out |
Specify the pointer to the number of the deleting data for the deletion from the Magazine management table. Set the number of the deleting data(1...) to the pointed data before calling this function. After the execution of this function, *data_num holds the real deleted number of data. |
| mag | in |
Specify the pointer to IODBTLMAG2 structure which is used for searching the Tool management data number to be deleted. The IODBTLMAG2 structure is as follows.
typedef struct iodbtlmag2 {
short magazine; /* magazine number */
short pot; /* pot number */
} IODBTLMAG2;
|
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_BUSY |
|
|||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of OBDERR structure.
|
|||||||||
| EW_NOOPT |
The Tool management function 64 pairs, or the Tool management function 240 pairs, or the Tool management function 1000 pairs. |
|||||||||
| EW_PROT |
The Magazine management data table is write protected. |
toolmng\cnc_delpot_property
This function deletes the pot property data within the range specified by "s_number" and "data_num".
PROTOTYPE
FWLIBAPI short WINAPI cnc_delpot_property( unsigned short FlibHndl, short magazine, short s_number, short *data_num );
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| magazine | in |
Specify the deleting magazine number ("1"-"8"). |
| s_number | in |
Specify the start number of the deleting pot type. |
| data_num | in/out |
The pointer to the number of deleting data.
The pot property data that belongs to one pot type is counted by the set with one deleting number. |
ERRORS
| Code | Description |
|---|---|
| EW_BUSY |
|
| EW_LENGTH |
|
| EW_NUMBER |
|
| EW_ATTRIB |
|
| EW_NOOPT |
The Tool management function 64-pairs, 240-pairs or 1000 pairs and the tool management extension B function are necessary. |
toolmng\cnc_deltool
Deletes the Tool management data which is specified by the start data number
and the number of the data from the Tool management data table.
Deletion by this function is done sequentially one by one.
Once the error occurs, succeeding deletion is aborted.
When the Tool management data is deleted normally from the Tool
management data table by this function, the tool number is also deleted
from the Magazine management table by the CNC process.
Note) This function is only for "Fast Ethernet board" and "Embedded Ethernet". So, this function is not supported at "Ethernet board".
PROTOTYPE
FWLIBAPI short WINAPI cnc_deltool(unsigned short FlibHndl,short s_number, short *data_num);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| s_number | in |
Specify the start data number for the deletion from the Tool management data table. |
| data_num | in/out |
Specify the pointer to the number of the deleting data for the deletion from the Tool management data table. Set the number of the deleting data(1...) to the pointed data before calling this function. This function deletes the number of Tool management data specified by "*data_num", from the index specified by "s_number". After the execution of this function, *data_num holds the real deleted number of data. |
ERRORS
| Code | Description |
|---|---|
| EW_BUSY |
|
| EW_NUMBER |
|
| EW_NOOPT |
The Tool management function 64 pairs, or the Tool management function 240 pairs, or the Tool management function 1000 pairs. |
| EW_PROT |
The Tool management data table is write protected. |
toolmng\cnc_rdmag_property
Reads the magazine property data.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdmag_property( unsigned short FlibHndl, short *data_num, IODBMAGPRTY * magprty );
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| data_num | in/out |
The pointer to the number of reading data. ("1"-"8")
The magazine property data that belongs to one magazine number is counted by the set with one reading number. |
| magprty | in/out |
The pointer to the structure that storage the magazine property data.
typedef struct iodbmagprty {
short mag ; /* Magazine number */
short reserve ; /* Reserved */
unsigned char mag_info ; /* Magazine information data */
char reserve[3] ; /* Reserved */
short mt_line ; /* Matrix line number */
short mt_row ; /* Matrix line number */
long cstm[4] ; /* Customize data */
} IODBMAGPRTY;
|
ERRORS
| Code | Description |
|---|---|
| EW_BUSY |
|
| EW_LENGTH |
|
| EW_NUMBER |
|
| EW_NOOPT |
The Tool management function 64-pairs, 240-pairs or 1000 pairs and the tool management extension B function are necessary. |
toolmng\cnc_rdmagazine
Reads the registered Tool management data number from the Magazine
management table.
This function searches at the Magazine management table using the magazine number, pot number.
And if it finds, it reads the Tool management data number from the matched entry.
Note) This function is only for "Fast Ethernet board" and "Embedded Ethernet". So, this function is not supported at "Ethernet board".
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdmagazine(unsigned short FlibHndl,short *data_num, IODBTLMAG *mag);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| data_num | in/out |
Specify the pointer to the number of the reading data for reading from the Magazine management table. Set the number of the reading data(1...) to the pointed data before calling this function. After the execution of this function, *data_num holds the real read number of data. |
| mag | in/out |
Specify the pointer to IODBTLMAG structure including the Tool management data number to be read. The IODBTLMAG structure is as follows.
typedef struct iodbtlmag {
short magazine; /* magazine number */
short pot; /* pot number */
sshort tool_index; /* tool management data number */
} IODBTLMAG;
|
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_BUSY |
|
|||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of OBDERR structure.
|
|||||||||
| EW_NOOPT |
The Tool management function 64 pairs, or the Tool management function 240 pairs, or the Tool management function 1000 pairs. |
toolmng\cnc_rdpot_property
This function reads the pot property data within the range specified by "s_number" and "data_num".
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdpot_property( unsigned short FlibHndl, short magazine, short s_number, short *data_num, IODBPOTPRTY * potprty );
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| magazine | in |
Specify the reading magazine number("1"-"8"). |
| s_number | in |
Specify the start number of the reading pot type. |
| data_num | in/out |
The pointer to the number of reading data.
The pot property data that belongs to one pot type is counted by the set with one reading number. |
| potprty | out |
The pointer to the structure that storage the pot property data.
typedef struct iodbpotprty {
short tool_no /* Tool control number */
short pot_type ; /* Pot type */
unsigned char pot_info1 ; /* Pot information data1 */
unsigned char pot_info2 ; /* Pot information data2 */
char reserve[2] ; /* Reserved */
long cstm[10] ; /* Customize data */
} IODBPOTPRTY;
|
ERRORS
| Code | Description |
|---|---|
| EW_BUSY |
|
| EW_LENGTH |
|
| EW_NUMBER |
|
| EW_ATTRIB |
|
| EW_NOOPT |
The Tool management function 64-pairs, 240-pairs or 1000 pairs and the tool management extension B function are necessary. |
toolmng\cnc_rdtool
Reads the Tool management data which is specified by the start data number
and the number of the data from the Tool management data table.
Reading by this function is done sequentially one by one.
Once the error occurs, succeeding reading is aborted.
Note) This function is only for "Fast Ethernet board" and "Embedded Ethernet". So, this function is not supported at "Ethernet board".
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdtool(unsigned short FlibHndl,short s_number, short *data_num,IODBTLMNG *tool);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| s_number | in |
Specify the start data number for reading from the Tool management data table. |
| data_num | in/out |
Specify the pointer to the number of the reading data for reading from the Tool management data table. Set the number of the reading data(1...) to the pointed data before calling this function. This function reads the number of Tool management data specified by "*data_num", from the index specified by "s_number". After the execution of this function, *data_num holds the real read number of data. |
| tool | out |
Specify the pointer to IODBTLMNG structure including the Tool management data to be read. As for the IODBTLMNG structure, refer to the explanation of arguments of cnc_regtool function. |
ERRORS
| Code | Description |
|---|---|
| EW_BUSY |
|
| EW_NUMBER |
|
| EW_NOOPT |
The Tool management function 64 pairs, or the Tool management function 240 pairs, or the Tool management function 1000 pairs. |
toolmng\cnc_rdtool_f2
Reads the Tool management data which is specified by the start data number
and the number of the data from the Tool management data table.
Reading by this function is done sequentially one by one.
Once the error occurs, succeeding reading is aborted.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdtool_f2(unsigned short FlibHndl,
short s_number, short *data_num,IODBTLMNG_F2 *tool);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| s_number | in |
Specify the start data number for reading from the Tool management data table. |
| data_num | in/out |
Specify the pointer to the number of the reading data for reading from the Tool management data table. Set the number of the reading data(1...) to the pointed data before calling this function. This function reads the number of Tool management data specified by "*data_num", from the index specified by "s_number". After the execution of this function, *data_num holds the real read number of data. |
| tool | out |
Specify the pointer to IODBTLMNG_F2 structure including the Tool management data to be read. As for the IODBTLMNG_F2 structure, refer to the explanation of arguments of cnc_regtool_f2 function. |
ERRORS
| Code | Description |
|---|---|
| EW_BUSY |
|
| EW_NUMBER |
|
| EW_NOOPT |
The Tool management function and the extended driver/library function are necessary. |
toolmng\cnc_rdtoolgeom_tlm
The tool geometry data of number specified by datanum is read from the tool geometry data number specified by snum.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdtoolgeom_tlm(unsigned short FlibHndl, short snum, short *datanum, IODBTLGEOM *tool) ;
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| snum | in |
Specify the reading start tool geometry data number. |
| datanum | in/out |
Specify the pointer to the number(1-) of the writing data. |
| tool | out |
The pointer to the IODBTLGEOM structure which stores the tool geometry data. |
ERRORS
| Code | Description |
|---|---|
| EW_BUSY |
|
| EW_NUMBER |
|
| EW_LENGTH |
|
| EW_NOOPT |
The Tool management function 64 pairs, or the Tool management function 240 pairs, or the Tool management function 1000 pairs and Tool management function oversize tools support option. |
toolmng\cnc_reg_toolstrage
Storage position of magazine number and pot number is registered or released to tool management data. By specifying the storage position of magazine/pot for the tool, tool can be return the original position after moving to spindle position or stand by position. Magazine/pot which is specified as storage position cannot attach other tool. Specify the registration with attaching the tool to storage position. Specify the release with attaching the tool to storage position. It is possible to register storage position for all tools in a magazine. It is possible to register storage position for all tools in all magazines.
PROTOTYPE
FWLIBAPI short WINAPI cnc_regmagazine( unsigned short FlibHndl, unsigned char mode, IODBTLMAG *mag );
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| mode | in |
Specify the Registration or Release of Tool storage position of specified magazine/pot.
|
||||||
| mag | in |
Specify the pointer to IODBTLMAG structure including the Tool management data number to be registered/released. The IODBTLMAG structure is as follows.
typedef struct iodbtlmag {
short magazine; /* magazine number */
short pot; /* pot number */
short tool_index; /* tool management data number */
} IODBTLMAG;
|
ERRORS
| Code | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of OBDERR structure.
|
||||||||||||
| EW_NOOPT |
Tool pair for tool management function: 64 pairs, 240pair or 1000pair and tool management expansion B is necessary. |
||||||||||||
| EW_PROT |
Tool management data table is write protected. |
||||||||||||
| EW_REJECT |
The storage position of magazine and pot cannot be registered. There is no tool in specified pot. |
||||||||||||
| EW_OVRFLOW |
|
toolmng\cnc_regmagazine
Registers the Tool management data number to the Magazine management table.
This function searches at the Magazine management table using the magazine number, pot number.
And if it finds, it writes the Tool management data number to the matched entry.
Note) This function is only for "Fast Ethernet board" and "Embedded Ethernet".
So, this function is not supported at "Ethernet board".
PROTOTYPE
FWLIBAPI short WINAPI cnc_regmagazine(unsigned short FlibHndl,short *data_num, IODBTLMAG *mag);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| data_num | in/out |
Specify the pointer to the number of the registration data for the registration to the Magazine management table. Set the number of the registration data(1...) to the pointed data before calling this function. After the execution of this function, *data_num holds the real registered number of data. |
| mag | in |
Specify the pointer to IODBTLMAG structure including the Tool management data number to be registered. The IODBTLMAG structure is as follows.
typedef struct iodbtlmag {
short magazine; /* magazine number */
short pot; /* pot number */
short tool_index; /* tool management data number */
} IODBTLMAG;
|
ERRORS
| Code | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_BUSY |
|
||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of OBDERR structure.
|
||||||||||||
| EW_NOOPT |
The Tool management function 64 pairs, or the Tool management function 240 pairs, or the Tool management function 1000 pairs. |
||||||||||||
| EW_PROT |
The Magazine management data table is write protected. |
||||||||||||
| EW_REJECT |
This function tries to register the data against the Magazine management data table entry which has already existed or interfere with other tool. |
||||||||||||
| EW_OVRFLOW |
|
toolmng\cnc_regtool
Registers the Tool management data which is specified by the start data number
and the number of the data to the Tool management data table.
Registration by this function is done sequentially one by one.
Once the error occurs, succeeding registration is aborted.
Note) This function is only for "Fast Ethernet board" and "Embedded Ethernet". So, this function is not supported at "Ethernet board".
PROTOTYPE
FWLIBAPI short WINAPI cnc_regtool(unsigned short FlibHndl,short s_number, short *data_num,IODBTLMNG *tool);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| s_number | in |
Specify the start data number for the registration to the Tool management data table. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| data_num | in/out |
Specify the pointer to the number of the registration data for the registration to the Tool management data table. Set the number of the registration data(1...) to the pointed data before calling this function. This function registers the number of Tool management data specified by "*data_num", from the index specified by "s_number". After the execution of this function, *data_num holds the real registered number of data. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tool | in |
Specify the pointer to IODBTLMNG structure including the Tool management data to be registered. The IODBTLMNG structure is as follows.
typedef struct iodbtlmng {
long T_code; /* tool number(T) */
long life_count; /* tool life counter */
long max_life; /* maximum of tool life */
long rest_life; /* rest of tool life */
unsigned char life_stat; /* state of tool life */
unsigned char cust_bits; /* customizing bit */
unsigned short tool_info; /* tool info. */
short H_code; /* tool length compensation number (H) */
short D_code; /* cutter compensation number (D) */
long spindle_speed; /* spindle speed(S) */
long feedrate; /* feed rate(F) */
short magazine; /* magazine number(read only) */
short pot; /* pot number(read only) */
short G_code; /* tool geometric compensation number(G) */
short W_code; /* tool wear compensation number(W) */
short gno; /* tool geometric number */
short grp; /* edge group number(only 0i-F, 30i/31i/32i) */
short edge; /* edge number(only 0i-F, 30i/31i/32i) */
short org_magazine; /* origin magazine number(only 0i-F, 30i/31i/32i) */
short org_pot; /* origin pot number(only 0i-F, 30i/31i/32i) */
short reserve_s; /* reserved */
long reserved[2]; /* reserved */
long custom1; /* customizing data 1 */
long custom2; /* customizing data 2 */
long custom3; /* customizing data 3 */
long custom4; /* customizing data 4 */
long custom5; /* customizing data 5 */
long custom6; /* customizing data 6 */
long custom7; /* customizing data 7 */
long custom8; /* customizing data 8 */
long custom9; /* customizing data 9 */
long custom10; /* customizing data 10 */
long custom11; /* customizing data 11 */
long custom12; /* customizing data 12 */
long custom13; /* customizing data 13 */
long custom14; /* customizing data 14 */
long custom15; /* customizing data 15 */
long custom16; /* customizing data 16 */
long custom17; /* customizing data 17 */
long custom18; /* customizing data 18 */
long custom19; /* customizing data 19 */
long custom20; /* customizing data 20 */
} IODBTLMNG;
|
ERRORS
| Code | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_BUSY |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_NUMBER |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of OBDERR structure.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_NOOPT |
The Tool management function 64 pairs, or the Tool management function 240 pairs, or the Tool management function 1000 pairs. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_PROT |
The Tool management data table is write protected. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_REJECT |
This function tries to register the data against the Tool management data table entry which has already existed or interfere with other tool. |
toolmng\cnc_regtool_f2
Registers the Tool management data which is specified by the start data number
and the number of the data to the Tool management data table.
Registration by this function is done sequentially one by one.
Once the error occurs, succeeding registration is aborted.
PROTOTYPE
FWLIBAPI short WINAPI cnc_regtool_f2(unsigned short FlibHndl,
short s_number, short *data_num, IODBTLMNG_F2 *tool);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||
| s_number | in |
Specify the start data number for the registration to the Tool management data table. |
||||||
| data_num | in/out |
Specify the pointer to the number of the registration data for the registration to the Tool management data table. Set the number of the registration data(1...) to the pointed data before calling this function. This function registers the number of Tool management data specified by "*data_num", from the index specified by "s_number". After the execution of this function, *data_num holds the real registered number of data. |
||||||
| tool | in |
Specify the pointer to IODBTLMNG_F2 structure including the Tool management data to be registered. The IODBTLMNG_F2 structure is as follows.
typedef struct iodbtlmng_f2 {
long T_code; /* tool number(T) */
long life_count; /* tool life counter */
long max_life; /* maximum of tool life */
long rest_life; /* rest of tool life */
unsigned char life_stat; /* state of tool life */
unsigned char cust_bits; /* customizing bit */
unsigned short tool_info; /* tool info. */
short H_code; /* tool length compensation number (H) */
short D_code; /* cutter compensation number (D) */
long spindle_speed; /* spindle speed(S) */
long feedrate; /* feed rate(F) */
short magazine; /* magazine number(read only) */
short pot; /* pot number(read only) */
short G_code; /* tool geometric compensation number(G) */
short W_code; /* tool wear compensation number(W) */
short gno; /* tool geometric number */
short grp; /* edge group number(only 0i-F, 30i/31i/32i) */
short edge; /* edge number(only 0i-F, 30i/31i/32i) */
short org_magazine; /* origin magazine number(only 0i-F, 30i/31i/32i) */
short org_pot; /* origin pot number(only 0i-F, 30i/31i/32i) */
short reserve_s; /* reserved */
long reserved[2]; /* reserved */
long custom1; /* customizing data 1 */
long custom2; /* customizing data 2 */
long custom3; /* customizing data 3 */
long custom4; /* customizing data 4 */
long custom5; /* customizing data 5 */
long custom6; /* customizing data 6 */
long custom7; /* customizing data 7 */
long custom8; /* customizing data 8 */
long custom9; /* customizing data 9 */
long custom10; /* customizing data 10 */
long custom11; /* customizing data 11 */
long custom12; /* customizing data 12 */
long custom13; /* customizing data 13 */
long custom14; /* customizing data 14 */
long custom15; /* customizing data 15 */
long custom16; /* customizing data 16 */
long custom17; /* customizing data 17 */
long custom18; /* customizing data 18 */
long custom19; /* customizing data 19 */
long custom20; /* customizing data 20 */
long custom21; /* customizing data 21 */
long custom22; /* customizing data 22 */
long custom23; /* customizing data 23 */
long custom24; /* customizing data 24 */
long custom25; /* customizing data 25 */
long custom26; /* customizing data 26 */
long custom27; /* customizing data 27 */
long custom28; /* customizing data 28 */
long custom29; /* customizing data 29 */
long custom30; /* customizing data 30 */
long custom31; /* customizing data 31 */
long custom32; /* customizing data 32 */
long custom33; /* customizing data 33 */
long custom34; /* customizing data 34 */
long custom35; /* customizing data 35 */
long custom36; /* customizing data 36 */
long custom37; /* customizing data 37 */
long custom38; /* customizing data 38 */
long custom39; /* customizing data 39 */
long custom40; /* customizing data 40 */
} IODBTLMNG_F2;
|
ERRORS
| Code | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_BUSY |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_NUMBER |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of OBDERR structure.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_NOOPT |
The Tool management function 64 pairs, or the Tool management function 240 pairs, or the Tool management function 1000 pairs. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_PROT |
The Tool management data table is write protected. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_REJECT |
This function tries to register the data against the Tool management data table entry which has already existed or interfere with other tool. |
toolmng\cnc_tool_move
The tool management data number is moved specifying the magazine number and the pot number of the source and the destination. When Tool Management Function Tool storage position reservation is valid, an empty pot or the origin position registered into the tool which moves can be specified for the moving destination.
PROTOTYPE
FWLIBAPI short WINAPI cnc_tool_move( unsigned short FlibHndl, IODBTLMAG2 *src_mag, IODBTLMAG2 *dest_mag );
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| src_mag | in |
Specify the pointer to IODBTLMNG2 structure including the source magazine and pod to be registered. |
| dest_mag | in |
Specify the pointer to IODBTLMNG2 structure including the destination magazine and pod to be registered. The IODBTLMAG2 structure is as follows.
typedef struct iodbtlmag2 {
short magazine; /* magazine number */
short pot; /* pot number */
} IODBTLMAG2;
|
ERRORS
| Code | Description | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of OBDERR structure.
|
|||||||||||||||||||||
| EW_NOOPT |
The Tool management function 64 pairs, or the Tool management function 240 pairs, or the Tool management function 1000 pairs. |
|||||||||||||||||||||
| EW_PROT |
The Magazine management data table is write protected. |
|||||||||||||||||||||
| EW_REJECT |
|
toolmng\cnc_wrmag_property
Writes the magazine property data.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrmag_property( unsigned short FlibHndl, short *data_num, IODBMAGPRTY * magprty );
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| data_num | in/out |
The pointer to the number of writing data. ("1"-"8")
The magazine property data that belongs to one magazine number is counted by the set with one writing number. |
| magprty | in |
The pointer to the structure that storage the magazine property data.
typedef struct iodbmagprty {
short mag ; /* Magazine number */
short reserve ; /* Reserved */
unsigned char mag_info ; /* Magazine information data */
char reserve[3] ; /* Reserved */
short mt_line ; /* Matrix line number */
short mt_row ; /* Matrix line number */
long cstm[4] ; /* Customize data */
} IODBMAGPRTY;
|
ERRORS
| Code | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| EW_BUSY |
|
|||||||||
| EW_LENGTH |
|
|||||||||
| EW_NUMBER |
|
|||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of OBDERR structure.
|
|||||||||
| EW_NOOPT |
The Tool management function 64-pairs, 240-pairs or 1000 pairs and the tool management extension B function are necessary. |
toolmng\cnc_wrmagazine
Writes the Tool management data number to the entry of the Magazine
management table specified by magazine number and pot number.
Note) This function is only for "Fast Ethernet board" and "Embedded Ethernet". So, this function is not supported at "Ethernet board".
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrmagazine(unsigned short FlibHndl,short magazine, short pot,short tool_index);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| magazine | in |
Specify magazine number. |
| pot | in |
Specify pot number. |
| tool_index | in |
Specify the Tool management data number. |
ERRORS
| Code | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_BUSY |
|
||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of OBDERR structure.
|
||||||||||||
| EW_NOOPT |
The Tool management function 64 pairs, or the Tool management function 240 pairs, or the Tool management function 1000 pairs. |
||||||||||||
| EW_PROT |
The Magazine management data table is write protected. |
||||||||||||
| EW_REJECT |
|
||||||||||||
| EW_OVRFLOW |
|
toolmng\cnc_wrpot_property
This function writes the pot property data within the range specified by "s_number" and "data_num".
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrpot_property( unsigned short FlibHndl, short magazine, short s_number, short *data_num, IODBPOTPRTY * potprty );
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| magazine | in |
Specify the writing magazine number("1"-"8"). |
| s_number | in |
Specify the start number of the writing pot type. |
| data_num | in/out |
The pointer to the number of writing data.
The pot property data that belongs to one pot type is counted by the set with one writing number. |
| potprty | out |
The pointer to the structure that storage the pot property data.
typedef struct iodbpotprty {
short tool_no /* Tool control number */
short pot_type ; /* Pot type */
unsigned char pot_info1 ; /* Pot information data1 */
unsigned char pot_info2 ; /* Pot information data2 */
char reserve[2] ; /* Reserved */
long cstm[10] ; /* Customize data */
} IODBPOTPRTY;
|
ERRORS
| Code | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_BUSY |
|
||||||||||||||||||||||||
| EW_LENGTH |
|
||||||||||||||||||||||||
| EW_NUMBER |
|
||||||||||||||||||||||||
| EW_ATTRIB |
|
||||||||||||||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of OBDERR structure.
|
||||||||||||||||||||||||
| EW_NOOPT |
The Tool management function 64-pairs, 240-pairs or 1000 pairs and the tool management extension B function are necessary. |
toolmng\cnc_wrtool
Writes the specified Tool management data to the Tool management data table.
In case of writing the individual data on the Tool management data,
use cnc_wrtool2 function.
Note) This function is only for "Fast Ethernet board" and "Embedded Ethernet". So, this function is not supported at "Ethernet board".
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrtool(unsigned short FlibHndl,short number, IODBTLMNG *tool);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| number | in |
Specify the data number at the Tool management data table. |
| tool | in |
Specify the pointer to IODBTLMNG structure including the Tool management data to be written. As for the IODBTLMNG structure, refer to the explanation of arguments of cnc_regtool function. |
ERRORS
| Code | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_BUSY |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_NUMBER |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of OBDERR structure.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_NOOPT |
The Tool management function 64 pairs, or the Tool management function 240 pairs, or the Tool management function 1000 pairs. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_PROT |
The Tool management data table is write protected. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_REJECT |
|
toolmng\cnc_wrtool2
Writes the individual data on the Tool management data to the specified Tool management data table.
Note) This function is only for "Fast Ethernet board" and "Embedded Ethernet". So, this function is not supported at "Ethernet board".
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrtool2(unsigned short FlibHndl,short number, IDBTLM *wrtool);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| number | in |
Specify the data number at the Tool management data table. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| wrtool | in |
Specify the pointer to IDBTLM structure including the Tool management data to be written. The IDBTLM structure is as follows.
typedef struct idbtlm {
short data_id; /* specified data ID */
union {
unsigned char data1; /* 1byte type data */
short data2; /* 2byte type data */
long data4; /* 4byte type data */
} item;
} IDBTLM;
|
ERRORS
| Code | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_BUSY |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_NUMBER |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_ATTRIB |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of OBDERR structure.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_NOOPT |
The Tool management function 64 pairs, or the Tool management function 240 pairs, or the Tool management function 1000 pairs. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_PROT |
The Tool management data table is write protected. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_REJECT |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_OVRFLOW |
|
toolmng\cnc_wrtool_f2
Writes the specified Tool management data to the Tool management data table.
In case of writing the individual data on the Tool management data, use cnc_wrtool2_f2 function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrtool_f2(unsigned short FlibHndl,
short number, IODBTLMNG_F2 *tool);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| number | in |
Specify the data number at the Tool management data table. |
| tool | in |
Specify the pointer to IODBTLMNG_F2 structure including the Tool management data to be written. As for the IODBTLMNG_F2 structure, refer to the explanation of arguments of cnc_regtool_f2 function. |
ERRORS
| Code | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_BUSY |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_NUMBER |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of OBDERR structure.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_NOOPT |
The Tool management function 64 pairs, or the Tool management function 240 pairs, or the Tool management function 1000 pairs. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_PROT |
The Tool management data table is write protected. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_REJECT |
|
toolmng\cnc_wrtoolgeom_tlm
The tool geometry data of number specified by datanum is written from the tool geometry data number specified by snum.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrtoolgeom_tlm(unsigned short FlibHndl, short snum, short *datanum, IODBTLGEOM *tool) ;
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| snum | in |
Specify the writing start tool geometry data number. |
| datanum | in/out |
Specify the pointer to the number(1-) of the writing data. |
| tool | in |
The pointer to the IODBTLGEOM structure which stored the tool geometry data.
typedef struct tlmngtlgeom {
unsigned char l_pot_num; /* Left pot occupation unit */
unsigned char r_pot_num; /* Right pot occupation unit */
unsigned char u_pot_num; /* Upper pot occupation unit (0i-F, 30i/31i/32i only) */
unsigned char d_pot_num; /* Lower pot occupation unit (0i-F, 30i/31i/32i only) */
unsigned char tl_geom_num ; /* Geometry A or B (0i-F, 30i/31i/32i only) */
} IODBTLGEOM;
Specify the value of range 0 to 4 for l_pot_num, r_pronum, u_pot_num and d_pot_num.(1 unit = 0.5 pot)specify 0 for figure A, or 1 for figure B for tl_geom_num. |
ERRORS
| Code | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_BUSY |
|
||||||||||||||||||
| EW_NUMBER |
|
||||||||||||||||||
| EW_LENGTH |
|
||||||||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
||||||||||||||||||
| EW_NOOPT |
The Tool management function 64 pairs, or the Tool management function 240 pairs, or the Tool management function 1000 pairs and Tool management function oversize tools support option. |
||||||||||||||||||
| EW_PROT |
The tool geometry data has already been registered in the tool stored in the pot. |
unsolic\cnc_rdunsolicmsg
Please refer to "Unsolicited Messaging Function" for the detail information of unsolicited messaging function.
This function does not have the argument, library handle "FlibHndl".
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdunsolicmsg( short bill, IDBUNSOLICMSG *data );
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| bill | in |
Handle for the Message data reading. Specify the value acquired by the cnc_unsolicstart or the value notified by the argument(lParam) of the message reception function. |
||||||||||||||||||||||||||||||||
| data | out |
Pointer to IDBUNSOLICMSG structure in which the unsolicited messaging data will be stored. The IDBUNSOLICMSG structure is as follows.
typedef struct idbunsolicmsg {
short getno ;
struct {
short rdsize ;
void *data ;
} msg[3] ;
} IDBUNSOLICMSG ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
| EW_DATA |
|
unsolic\cnc_rdunsolicmsg2
Reads the unsolicited messaging data. This function is available only for Series Series 30i/31i/32i, 0i-D/F and PMi-A. This function cannot be used with Visual Basic. Please use Visual C++ for making your application.
Please refer to "Unsolicited Messaging Function" for the detail information of unsolicited messaging function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdunsolicmsg2( short bill, IDBUNSOLICMSG2 *data2 );
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| bill | in |
Handle for the Message data reading. Specify the value acquired by the cnc_unsolicstart or the value notified by the argument(lParam) of the message reception function. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||
| data | out |
Pointer to IDBUNSOLICMSG2 structure in which the unsolicited messaging data will be stored. The IDBUNSOLICMSG2 structure is as follows.
typedef struct idbunsolicmsg2 {
unsigned short getnum;
char dummy[2];
UNSOLICMSG_TYPE_MSG get[3];
} IDBUNSOLICMSG2 ;
typedef struct unsolicmsg_type_msg {
unsigned short type;
char dummy1[2];
union {
typedef {
unsigned short path;
char dummy2[2];
unsigned long size;
void *data;
} pmc;
typedef {
unsigned short path;
char dummy3[2];
unsigned long num;
void *data;
} macro;
} msg;
} UNSOLICMSG_TYPE_MSG ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
| EW_DATA |
|
unsolic\cnc_rdunsolicprm
Please refer to "Unsolicited Messaging Function" for the detail information of unsolicited messaging function.
It is necessary to execute cnc_unsolicstart and make the parameter effective before reading the parameters by this function. So, when this function is called just after the parameters are set by the cnc_wrunsolicprm, the correct value cannot be read.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdunsolicprm( unsigned short FlibHndl, short number, IODBUNSOLIC *data );
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||
| number | in |
The parameter number for unsolicited messaging. Reserved argument, so must be set to "1". |
|||||||||||||||||||||||||||||||||||||||||||||
| data | out |
Pointer to IODBUNSOLIC structure in which the parameter for the unsolicited messaging will be stored. The IODBUNSOLIC structure is as follows.
typedef struct iodbunsolic {
char ipaddr[16] ;
unsigned short port ;
short reqaddr ;
short pmcno ;
short retry ;
short timeout ;
short alivetime;
short setno ;
union {
struct {
short type ;
short rdaddr ;
short rdno ;
short rdsize ;
} pmc ;
struct {
short type ;
long dummy1 ;
short dummy2 ;
} dmy ;
} rddata[3] ;
} IODBUNSOLIC ;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
| EW_NUMBER |
|
| EW_PARAM |
|
unsolic\cnc_rdunsolicprm2
Please refer to "Unsolicited Messaging Function" for the detail information of unsolicited messaging function.
It is necessary to execute cnc_wrunsolicprm2 and make the parameter effective before reading the parameters by this function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdunsolicprm2( unsigned short FlibHndl, short number, IODBUNSOLIC *data );
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| number | in |
The parameter number for unsolicited messaging. Reserved argument, so must be set to "1". |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| data2 | out |
Pointer to IODBUNSOLIC2 structure in which the parameter for the unsolicited messaging will be stored. The IODBUNSOLIC structure is as follows.
typedef struct iodbunsolic2 {
char ipaddr[64];
unsigned long port;
unsigned short retry;
unsigned short timeout;
unsigned short alivetime;
char dummy1[8];
UNSOLICMSG_TYPE_PRM cntrl;
unsigned short transnum;
char dummy2[14];
UNSOLICMSG_TYPE_PRM trans[3];
} IODBUNSOLIC2;
typedef struct unsolicmsg_type_prm {
unsigned short type;
char dummy1[2];
union {
typedef {
unsigned short path;
short addr;
unsigned long no;
unsigned long size;
} pmc;
typedef {
unsigned short path;
char dummy2[2];
unsigned long no;
unsigned long num;
} macro;
} prm
} UNSOLICMSG_TYPE_PRM;
|
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
|
| EW_NUMBER |
|
| EW_PARAM |
|
unsolic\cnc_unsolicstart
Directs the starting of reception of the unsolicited messaging. The starting of reception directs by the PC that receives the unsolicited messaging.
This function is available only for Series 16i/18i/21i, 0i, Power Mate i, Series 30i/31i/32i and PMi-A. This function cannot be used with Visual Basic. Please use Visual C++ for making your application.
Please refer to "Unsolicited Messaging Function" for the detail information of unsolicited messaging function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_unsolicstart( unsigned short FlibHndl, short number, HWND hWnd, UINT msgno, short chkalive, short *bill );
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| number | in |
The parameter number for unsolicited messaging. Reserved argument, so must be set to "1". |
| hWnd | in |
Specify the window handle which receives the window message. |
| msgno | in |
Specify the window message number (0-16383). The window message number which is added WM_APP(0x8000) is notified to the application. |
| chkalive | in |
Specify the interval time(sec) that the unsolicited messaging server checks the existence signal transmitted from the communication board. Set the value longer than "alivetime" which has been set by cnc_wrunsolicprm. When the existence signal from CNC cannot be received during the time of about twice the value of chkalive, the message of wParam=-1 is transmitted to the application. When OFF/ON of the CNC power supply is done during this interval, the information of CNC power OFF(wParam=-1) cannot be notified to the application by the Unsolicited messaging server. So, the operation after that is not guaranteed. |
| bill | out |
Pointer to the data in which the handle for the Message data reading will be stored. This data will be used later when the Message data is read at cnc_rdunsolicmsg. |
ERRORS
| Code | Description |
|---|---|
| EW_NUMBER |
|
| EW_ATTRIB |
|
| EW_DATA |
|
| EW_PARAM |
|
| EW_BUSY |
|
| EW_FUNC |
|
| EW_BUFFER |
|
| EW_REJECT |
or The starting of reception was directed excluding PC that receives the unsolicited messaging. |
unsolic\cnc_unsolicstop
Directs the termination of reception of the unsolicited messaging.
When the CNC parameter No.905#4 is "1", this function can be executed from other PC in which the CNC unsolicited messaging server is active.
This function is available only for Series 16i/18i/21i, 0i, Series 30i/31i/32i, Power Mate i and PMi-A. This function cannot be used with Visual Basic. Please use Visual C++ for making your application.
Please refer to "Unsolicited Messaging Function" for the detail information of unsolicited messaging function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_unsolicstop( unsigned short FlibHndl, short number );
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| number | in |
The parameter number for unsolicited messaging. Reserved argument, so must be set to "1". |
ERRORS
| Code | Description |
|---|---|
| EW_NUMBER |
|
| EW_FUNC |
|
unsolic\cnc_wrunsolicprm
Please refer to "Unsolicited Messaging Function" for the detail information of unsolicited messaging function.
After calling the cnc_unsolicstart function, the parameter set by this function becomes effective.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrunsolicprm( unsigned short FlibHndl, short number, IODBUNSOLIC *data );
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| number | in |
The parameter number for unsolicited messaging. Reserved argument, so must be set to "1". |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| data | in |
Pointer to IODBUNSOLIC structure which sets the parameters for the unsolicited messaging. The IODBUNSOLIC structure is as follows.
typedef struct iodbunsolic {
char ipaddr[16] ;
unsigned short port ;
short reqaddr ;
short pmcno ;
short retry ;
short timeout ;
short alivetime;
short setno ;
union {
struct {
short type ;
short rdaddr ;
short rdno ;
short rdsize ;
} pmc ;
struct {
short type ;
long dummy1 ;
short dummy2 ;
} dmy ;
} rddata[3] ;
} IODBUNSOLIC ;
|
ERRORS
| Code | Description | |||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_FUNC |
|
|||||||||||||||||||||||||||||||||||||||
| EW_NUMBER |
|
|||||||||||||||||||||||||||||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of OBDERR structure.
|
|||||||||||||||||||||||||||||||||||||||
| EW_BUSY |
|
|||||||||||||||||||||||||||||||||||||||
| EW_REJECT |
|
unsolic\cnc_wrunsolicprm2
Sets the parameter for unsolicited messaging to CNC. This function is available only for Series 30i/31i/32i, 0i-D/F and PMi-A. This function cannot be used with Visual Basic. Please use Visual C++ for making your application.
After calling the cnc_unsolicstart function, the parameter set by thisfunction becomes effective.
Please refer to "Unsolicited Messaging Function" for the detail information of unsolicited messaging function.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrunsolicprm2( unsigned short FlibHndl, short number, IODBUNSOLIC2 *data2 );
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| number | in |
The parameter number for unsolicited messaging. Reserved argument, so must be set to "1". |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| data | in |
Pointer to IODBUNSOLIC2 structure which sets the parameters for the unsolicited messaging. The IODBUNSOLIC structure is as follows.
typedef struct iodbunsolic2 {
char ipaddr[64];
unsigned long port;
unsigned short retry;
unsigned short timeout;
unsigned short alivetime;
char dummy1[8];
UNSOLICMSG_TYPE_PRM cntrl;
unsigned short transnum;
char dummy2[14];
UNSOLICMSG_TYPE_PRM trans[3];
} IODBUNSOLIC2;
typedef struct unsolicmsg_type_prm {
unsigned short type;
char dummy1[2];
union {
typedef {
unsigned short path;
short addr;
unsigned long no;
unsigned long size;
} pmc;
typedef {
unsigned short path;
char dummy2[2];
unsigned long no;
unsigned long num;
} macro;
} prm
} UNSOLICMSG_TYPE_PRM;
|
ERRORS
| Code | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_BUSY |
The state of the unsolicited messaging function is not "Stop" |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_FUNC |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. Member of ODBERR : err_no
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_NUMBER |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no and err_dtno of OBDERR structure. Member of ODBERR : err_no
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_PROT |
Parameter writing is failed. In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of OBDERR structure. Member of ODBERR : err_no
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EW_REJECT |
|
wave\cnc_rdwavedata
Reads waveform diagnosis data.
In case of using this function, the waveform diagnosis screen of CNC must not be used.
If used, the behavior of this function is not guaranteed.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdwavedata(unsigned short FlibHndl, short channel, short axis, long rd_pntr, long *number, ODBWVDT *wvdt);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| channel | in |
Specify the channel number to be read.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| axis | in |
Specify axis number of data to be read.(1 to number of controlled axis) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rd_pntr | in |
Specify the start pointer to read. example) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| number | in/out |
Specify the address of the variable which shows the number of data
of the waveform diagnosis data. The maximum data number which can be sampled is shown in the following table according to the condition and the CNC MODEL.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| wvdt | out |
Pointer to the ODBWVDT structure including the waveform diagnosis data.
typedef struct odbwvdt {
short channel ; /* channel number */
short kind ; /* kind of waveform data */
union {
short axis ; /* axis number of waveform data */
struct { /* machine signal */
char adr ; /* kind of PMC address */
char bit ; /* bit number */
short no ; /* PMC address number */
} io ;
} u ;
char year ; /* year (0<->99) */
char month ; /* month (1<->12) */
char day ; /* day (1<->31) */
char hour ; /* hour (0<->23) */
char minute ; /* minute (0<->59) */
char second ; /* second (0<->59) */
short t_cycle ; /* sampling cycle (msec) */
short data[8192] ; /* waveform diagnosis data */
} ODBWVDT ;
Summary of the reading data
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ERRORS
| Code | Description |
|---|---|
| EW_FUNC |
cnc_wavestop function has not been executed. |
| EW_LENGTH |
The number of data(*number) is less than 1. |
| EW_NUMBER |
Channel number(channel) is out of range. |
| EW_ATTRIB |
Axis number(axis) is out of range. |
| EW_DATA |
Start pointer to read(rd_pntr) is out of range. |
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_PARAM |
3112#0=0 when CNC is turned on. set 3112#0=1 and reboot. |
| EW_BUFFER |
There is no specified waveform diagnosis data. (The case that the condition of a waveform diagnosis does not correspond to the specified channel number is included.) |
wave\cnc_rdwaveprm
Cnc_rdwaveprm2 supports Series 15i
and expanded the function.
Please use cnc_rdwaveprm2 better than cnc_rdwaveprm.
In case of using this function, the waveform diagnosis screen of CNC must not be used.
If used, the behavior of this function is not guaranteed.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdwaveprm(unsigned short FlibHndl, IODBWAVE *wave);
ARGUMENTS
| Name | Direction | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| wave | out |
Pointer to the IODBWAVE structure including the waveform diagnosis parameter.
typedef struct iodbwave {
short condition ; /* condition */
char trg_adr ; /* trigger address */
char trg_bit ; /* trigger bit */
short trg_no ; /* trigger number */
short delay ; /* delay time */
short t_range ; /* sampling time */
struct {
short kind ; /* kind of waveform data */
union {
#ifdef M_AXIS2 /* Series 15 : maximum axis=24 */
long axis ; /* axis information */
#else
short axis ; /* axis information */
#endif
struct { /* machine signal */
char adr ; /* kind of PMC address */
char bit ; /* bit number */
short no ; /* number of PMC address */
} io ;
} u ;
} ch[12] ;
} IODBWAVE ;
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_PARAM(Series16/18, 16i/18i/21i, 0i) |
3112#0=0 when CNC is turned on. Set 3112#0=1 and reboot. |
wave\cnc_rdwaveprm2
Reads the waveform diagnosis parameter setting.
If used, the behavior of this function is not guaranteed.
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdwaveprm2(unsigned short FlibHndl, IODBWVPRM *wave);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| wave | out |
Pointer to the IODBWVPRM structure including the waveform diagnosis parameter.
typedef struct iodbwvprm {
short condition ; /* condition */
char trg_adr ; /* trigger address */
char trg_bit ; /* trigger bit */
short trg_no ; /* trigger number */
short reserve1 ;
long delay ; /* delay time */
long t_range ; /* sampling time */
struct {
short kind ; /* kind of waveform data */
union {
long axis ; /* axis information */
struct { /* machine signal */
char adr ; /* kind of PMC address */
char bit ; /* bit number */
short no ; /* number of PMC address */
} io ;
} u ;
long reserve2 ;
} ch[12] ;
} IODBWVPRM ;
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_PARAM |
3112#0=0 when CNC is turned on. set 3112#0=1 and reboot. |
wave\cnc_wavestart
Starts a sampling of the waveform diagnosis data.
If used, the behavior of this function is not guaranteed.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wavestart(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. |
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_PARAM |
3112#0=0 when CNC is turned on. set 3112#0=1 and reboot. |
| EW_REJECT |
The waveform diagnosis parameter is not set correctly. |
wave\cnc_wavestat
Reads the sampling status of the waveform diagnosis data.
If used, the behavior of this function is not guaranteed.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wavestat(unsigned short FlibHndl, short *stat);
ARGUMENTS
| Name | Direction | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. |
||||||
| stat | in |
Specify the address of the variable to store the sampling status of waveform diagnosis data.
|
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_PARAM |
3112#0=0 when CNC is turned on. set 3112#0=1 and reboot. |
wave\cnc_wavestop
Stops a sampling of the waveform diagnosis data.
If used, the behavior of this function is not guaranteed.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wavestop(unsigned short FlibHndl);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. |
ERRORS
| Code | Description |
|---|---|
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_PARAM |
3112#0=0 when CNC is turned on. set 3112#0=1 and reboot. |
wave\cnc_wrwaveprm
Writes the waveform diagnosis parameter.
cnc_wrwaveprm2 supports Series 15i and
is expanded the function.
Please use cnc_wrwaveprm2 better than cnc_wrwaveprm.
If used, the behavior of this function is not guaranteed.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrwaveprm(unsigned short FlibHndl, IODBWAVE *wave);
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| wave | in |
Pointer to the IODBWAVE structure including the waveform diagnosis parameter.
typedef struct iodbwave {
short condition ; /* condition */
char trg_adr ; /* trigger address */
char trg_bit ; /* trigger bit */
short trg_no ; /* trigger number */
short delay ; /* delay time */
short t_range ; /* sampling time */
struct {
short kind ; /* kind of waveform data */
union {
#ifdef M_AXIS2 /* Series 15 : maximum axis=24 */
long axis ; /* axis information */
#else
short axis ; /* axis information */
#endif
struct { /* machine signal */
char adr ; /* kind of PMC address */
char bit ; /* bit number */
short no ; /* number of PMC address */
} io ;
} u ;
} ch[12] ;
} IODBWAVE ;
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ERRORS
| Code | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_DATA |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
(In case that a date is not related to channel, -1 is set) |
||||||||||||||||||||||||||||||||||||
| EW_NOOPT |
The extended driver/library function is necessary. |
||||||||||||||||||||||||||||||||||||
| EW_PARAM |
3112#0=0 when CNC is turned on. set 3112#0=1 and reboot. |
||||||||||||||||||||||||||||||||||||
| EW_REJECT |
The waveform diagnosis data is being sampled. |
wave\cnc_wrwaveprm2
Writes the waveform diagnosis parameter.
If used, the behavior of this function is not guaranteed.
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrwaveprm2(unsigned short FlibHndl, IODBWVPRM *wave );
ARGUMENTS
| Name | Direction | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| wave | in |
Pointer to the IODBWVPRM structure including the waveform diagnosis parameter.
typedef struct iodbwvprm {
short condition ; /* condition */
char trg_adr ; /* trigger address */
char trg_bit ; /* trigger bit */
short trg_no ; /* trigger number */
short reserve1 ;
long delay ; /* delay time */
long t_range ; /* sampling time */
struct {
short kind ; /* kind of waveform data */
union {
long axis ; /* axis information */
struct { /* machine signal */
char adr ; /* kind of PMC address */
char bit ; /* bit number */
short no ; /* number of PMC address */
} io ;
} u ;
long reserve2 ;
} ch[12] ;
} IODBWVPRM ;
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ERRORS
| Code | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EW_DATA |
The following detail status will be set onto the member, err_no of ODBERR structure (nErr_no of ODBERR user define type.).
(In case that a date is not related to channel, -1 is set) |
||||||||||||||||||||||||||||||||||||
| EW_NOOPT |
The extended driver/library function is necessary. |
||||||||||||||||||||||||||||||||||||
| EW_PARAM |
3112#0=0 when CNC is turned on. Set 3112#0=1 and reboot. |
||||||||||||||||||||||||||||||||||||
| EW_REJECT |
The waveform diagnosis data is being sampled. |
wire\cnc_rdmsptype
The data is stored in "data" array of "IODBMSTP" with signed binary format.
- Available range of data : 0,...,3
PROTOTYPE
FWLIBAPI short WINAPI cnc_rdmsptype( unsigned short FlibHndl, short s_number, short e_number, short length, IODBMSTP *mspt );
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| s_number | in |
Specify the start number of the measured point. |
| e_number | in |
Specify the end number of the measured point. |
| length | in |
Specify the data block length(size of IODBMSTP structure). (6+(number of measured points))
|
| mspt | out |
Pointer to the IODBMSTP structure including the measured point type data. The IODBMSTP structure is as follows.
typedef struct iodbmstp {
short datano_s; /* start number of measured point */
short dummy; /* (not used) */
short datano_e; /* end number of measured point */
char data[N]; /* measured point type data */
} IODBMSTP ; /* N : number of measured points */
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of IODBMSTP structure(length) is wrong. |
| EW_NUMBER |
Measured point number(s_number, e_number) is wrong. |
wire\cnc_setvrtclpos
Sets wire vertical position of axis specified with "axis".
PROTOTYPE
FWLIBAPI short WINAPI cnc_setvrtclpos( unsigned short FlibHndl, short axis );
ARGUMENTS
| Name | Direction | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
|||||||||
| axis | in |
Specify axis to set the wire virtical position.
|
ERRORS
| Code | Description |
|---|---|
| EW_ATTRIB |
The specification of axis is improper. |
| EW_NOOPT |
The extended driver/library function is necessary. |
| EW_REJECT |
|
wire\cnc_wrmsptype
Writes the measured point type data specified by "datano_s", "datano_e".
The data must be stored in "data" array of "IODBMSTP" with signed binary format.
- Available range of data : 0,...,3
PROTOTYPE
FWLIBAPI short WINAPI cnc_wrmsptype(unsigned short FlibHndl, short length, IODBMSTP *mspt);
ARGUMENTS
| Name | Direction | Description |
|---|---|---|
| FlibHndl | in |
Specify the library handle. See "Library handle" for details. |
| length | in |
Specify the data block length(size of IODBMSTP structure). (6+(number of measured points))
|
| mspt | out |
Pointer to the IODBMSTP structure including the measured point type data. The IODBMSTP structure is as follows.
typedef struct iodbmstp {
short datano_s; /* start number of measured point */
short dummy; /* (not used) */
short datano_e; /* end number of measured point */
char data[N]; /* measured point type data */
} IODBMSTP ; /* N : number of measured points */
|
ERRORS
| Code | Description |
|---|---|
| EW_LENGTH |
Size of IODBMSTP structure(length) is wrong. |
| EW_NUMBER |
Measured point number(datano_s, datano_e) is wrong. |
| EW_DATA |
Measured point type data(data) is out of range. |
For example, the following result is gotten by calling this function during executing N100's block of the next machining program. (for M of Series 16i/18i/21i, 0i-A/B/C, Power Mate i)
For example, the following information are gotten by execution of this function on Series 16i-M (B0F1-0001) system with 3 servo axes and without loader control.